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

CLI shows provided values as "default"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • cli, core
    • None

      The Jenkins CLI prints a help text when a command is not used correctly. This help text includes information about the default values of parameters that can be specified.

      If the invocation that triggers this help text provides values for parameters, those are shown instead of the actual defaults.

      Output below based on core PR 4274 which adds the "reason" parameter (and made me wonder what sort of default value "bar" is!?), but affects other commands:

      $ java -jar jenkins-cli.jar -webSocket -auth admin:admin -s http://localhost:8080 quiet-down -reason 'bar' -timeout 42 foo
      
      ERROR: No argument is allowed: foo
      java -jar jenkins-cli.jar quiet-down [-block] [-reason VAL] [-timeout N]
      Quiet down Jenkins, in preparation for a restart. Don’t start any builds.
       -block      : Block until the system really quiets down and no builds are
                     running (default: false)
       -reason VAL : Reason for quiet down that will be visible to users (default:
                     bar)
       -timeout N  : If non-zero, only block up to the specified number of
                     milliseconds (default: 42)
       

      Here's a fun one:

      $ java -jar jenkins-cli.jar -webSocket -auth admin:admin -s http://localhost:8080 list-jobs foo bar
      
      ERROR: Too many arguments: bar
      java -jar jenkins-cli.jar list-jobs [NAME]
      Lists all jobs in a specific view or item group.
       NAME : Name of the view (default: foo) 

            Unassigned Unassigned
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: