[JIRA] (JENKINS-59262) Jenkins CLI for 2.176.2 Error

4 views
Skip to first unread message

sanandres.justine18@gmail.com (JIRA)

unread,
Sep 6, 2019, 6:24:02 AM9/6/19
to jenkinsc...@googlegroups.com
Justine San Andres created an issue
 
Jenkins / Bug JENKINS-59262
Jenkins CLI for 2.176.2 Error
Issue Type: Bug Bug
Assignee: Unassigned
Components: cli
Created: 2019-09-06 10:23
Priority: Minor Minor
Reporter: Justine San Andres

Hi all,

 

Good day! I would like to ask some of your help with the error im encountering upon running cli in my jenkins. See details.

 

java -jar jenkins-cli.jar -s http://localhost7:8088/ build samplejob --username admin --password asdf1234

ERROR: "--username" is not a valid option
java -jar jenkins-cli.jar build JOB [-c] [-f] [-p] [-r N] [-s] [-v] [-w]
Starts a build, and optionally waits for a completion.
Aside from general scripting use, this command can be
used to invoke another job from within a build of one job.
With the -s option, this command changes the exit code based on
the outcome of the build (exit code 0 indicates a success)
and interrupting the command will interrupt the job.
With the -f option, this command changes the exit code based on
the outcome of the build (exit code 0 indicates a success)
however, unlike -s, interrupting the command will not interrupt
the job (exit code 125 indicates the command was interrupted).
With the -c option, a build will only run if there has been
an SCM change.
JOB : Name of the job to build
-c : Check for SCM changes before starting the build, and if there's no
change, exit without doing a build
-f : Follow the build progress. Like -s only interrupts are not passed
through to the build.
-p : Specify the build parameters in the key=value format.
-s : Wait until the completion/abortion of the command. Interrupts are passed
through to the build.
-v : Prints out the console output of the build. Use with -s
-w : Wait until the start of the command

C:\Jenkins>exit 2
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

 

I tried removing --username and put who-am-i but it is saying "Too many arguments"

 

Please help me. Thanks!

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dbeck@cloudbees.com (JIRA)

unread,
Oct 15, 2019, 5:00:06 AM10/15/19
to jenkinsc...@googlegroups.com
Daniel Beck closed an issue as Not A Defect
 

This is an issue tracker, not a support site. Please ask for help elsewhere.

Would try looking into argument order.

Change By: Daniel Beck
Status: Open Closed
Resolution: Not A Defect
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages