You must have obtained the Jenkins CLI tool prior to using the Jenkins CLI tool. |
To use the Jenkins CLI tool:
-
In a terminal/command prompt (window), change to the directory containing the
jenkins-cli.jar
file: -
Enter the command:
java -jar jenkins-cli.jar -s http://operations-center-url:port-number/ command
where:
-
operations-center-url
is the URL of the operations center. -
port-number
is the HTTP port through which operations center is accessible. -
command
is the Jenkins CLI command you want to execute.
To obtain a list of all options (like
-s
above or-auth
for authentication) that can be passed to thejenkins-cli.jar
command itself, enter the command:java -jar jenkins-cli.jar -h
-