I have an a single java project (let's say its name is PROJ) build in gradle and I wanted to run this project X times parallel, using Jenkins jobs. In addition, I would like to pass some parameters strictly to this project and somehow using it during project execution. How to do that?
Example
I have three Jenkins jobs, all executed at 1am:
- JOB1 is building a gradle project PROJ with parameter PAR=V1
- JOB2 is building a gradle project PROJ with parameter PAR=V2
- JOB3 is building a gradle project PROJ with parameter PAR=V3
Inside my java class I want to print the current value of the parameter PAR and the result should be as follows:
JOB1: Value of parameter PAR is V1
JOB2: Value of parameter PAR is V2
JOB3: Value of parameter PAR is V3
(of course due to the fact that tasks will be performed in parallel, messages could be in different order, e.g. V3, V1, V2)
Alternatively, is there a possibility that there can be only one job in Jenkins, but gradle has been configured to build project X times in parallel with different parameters?