Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11691

Triggering jobs via CLI ignores default parameter values

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • cli, core
    • None

      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-11691] Triggering jobs via CLI ignores default parameter values

          Norman Baumann created issue -
          Danny Staple made changes -
          Link New: This issue duplicates JENKINS-7162 [ JENKINS-7162 ]
          OHTAKE Tomohiro made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Jenkins IRC Bot made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: parameters [ 15594 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 141934 ] New: JNJira + In-Review [ 189887 ]

            Unassigned Unassigned
            nbaumann Norman Baumann
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: