CLI: using `-p key=value` throws an error on pre-filled default parameters

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • Component/s: cli
    • Environment:

      When using the jenkins-cli to build jobs, it works great only with passed parameters that are not pre-filled on our job panel.

       For instance:

      java -jar jenkins-cli.jar -auth me:my_token build my_job -s
      
      java -jar jenkins-cli.jar -auth me:my_token build my_job -p branch_name="branch_to_test" -s
      

      both work fine.

      ********

      But 

      java -jar jenkins-cli.jar -auth me:my_token build my_job -p prefilled_parameter="any_value" -s
      

      Doesn't work because a pre-filled value is already assigned to prefilled_parameter.

      And the following error is thrown:

      ERROR: CLI parameter submission is not supported for the class hudson.plugins.validating_string_parameter.ValidatingStringParameterDefinition type. Please file a bug report for this
      

      *********

      Expected: one can pass any parameter as long as the key exist in the expected list, and any value should overwrite the default pre-filled values.

       

      Side note: the REST API does not show such behaviour.

      Possible related source code location: https://github.com/jenkinsci/jenkins/blob/022a09cec0919e9bed7ce6535e13a19055b4190b/core/src/main/java/hudson/cli/BuildCommand.java#L114

            Assignee:
            Unassigned
            Reporter:
            Guillaume
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: