I use the CLI to trigger my project that has 3 parameter:
$ java -jar jenkins-cli.jar -s $JENKINS_SERVER build $PROJECT -p param1=a -p param2=b -p param3=c
That works fine.
Now, I set a default value for each parameters in the hope to not having to define each parameter on the command line:
$ java -jar jenkins-cli.jar -s $JENKINS_SERVER build $PROJECT -p param1=a -p param3=c
It works, but unfortunately this causes Jenkins to create a new instance of the project (aka. build) with one 2 parameters defined. The 3rd parameter (param2) which is missing on the command line is not defined. I was hoping that Jenkins would check the list of expected parameters to fill out the gaps for me.
- duplicates
-
JENKINS-7162 specifying a cli parameter causes unspecified parameters to be blank
- Closed