What does jenkins-cli do?
-
Allows you to modify Jenkins slave configurations
-
Allows you to disable/enable emails if you’re using the Ext-email plugin
-
Start a build
-
Lists all failing jobs
-
Retrieve details pertaining to a Jenkins job (e.g. current build status, last successful, last failed, etc.)
-
Ability to query for what is current building and pending
-
Ability to modify Jenkins job labels
-
Can retrieve the build history of a Jenkins job
-
Retrieve details of a particular build (e.g. committers, SCM changes, etc.)
-
Ability to stream logs of a currently building job.
How to install jenkins-cli
Install jenkins-cli into your gemset
gem install jenkins-cli
Optionally set $JENKINS_URL to your Jenkins master machine. Optionally set $JENKINS_USER to your Jenkins username you wish to operate as.
How to use jenkins-cli
Usage: jenkins-cli <command> [OPTIONS]
For a list of available commands just use type ‘jenkins-cli’