Status: Resolved (View Workflow)
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.
JENKINS-7162 specifying a cli parameter causes unspecified parameters to be blank
I have noticed that this is an alternative approach. Unfortunately, the bug is not solved by using this option.
The Jenkins server ignores all undefined parameters of incoming request - not matter if the CLI or wget/curl is used. Try it
This looks the same as the other issue. If those interested in this could add their comments to the other - it may gain more attention.
Do you know about
See http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Build. You can specify just what you need to.