Ok
I have a Jenkins work (a later version of Jenkins).
In my Jenkins work, I have a couple of parameters (string type).
Ex: param 1 = value 1 ... for parameter N = value N
Now, in Jenkins' assignment, in the BUILD section, I call " Invoke Gradle" .
In this section of Gradle, I invoke the task (s). For ex: clean build
I need: I want to pass the above Jenkins work parameters to Gradle as -PparamN = ValueN way?
But when I pass -Pparam1 = $ {param1} -Pparam2 = $ {param2} ... and so on in the "Toggles" option in the Gradle Build section, I see that the following is displayed in the Jenkins log:
It called Gradle is successfully processed with parameters.
...somepath.../bin/gradle -Dparam1=value1 -Dparam2=value2 ... -DparamN=valueN -Pparam1=value1 -Pparam2=value2 ... -PparamN=valueN
This suggests that Jenkins is kind enough to pass parameters (which I defined in the task) to Gradle as "-D" for free.
My? s:
- Well, I do not want to pass the above parameters as -Dxxx = yyy
- I only want to pass the parameters -Pxxx = yyy way
- Is this possible using the Invoke Gradle plugin?
parameter-passing plugins parameters jenkins gradle
Arun sangal
source share