java -jar jenkins-cli.jar ... help create-group
java -jar jenkins-cli.jar create-group CONTAINER GROUP
Creates a groups
CONTAINER : root | path/to/job-or-folder | path/to/folder/view-name |
slave-name
java -jar jenkins-cli.jar ... help create-credentials-by-xml
java -jar jenkins-cli.jar create-credentials-by-xml STORE DOMAIN
Create Credential by XML
STORE : Store Id
DOMAIN : Domain Name
java -jar jenkins-cli.jar ... help create-job
java -jar jenkins-cli.jar create-job NAME
Creates a new job by reading stdin as a configuration XML file.
NAME : Name of the job to create
java -jar jenkins-cli.jar ... help group-role-assignments
java -jar jenkins-cli.jar group-role-assignments CONTAINER GROUP [ROLES ...] [-e (--expanded-display)]
Displays or sets group role assignments.
CONTAINER : root | path/to/job-or-folder | path/to/folder/view-name |
slave-name
ROLES : ROLE[,GRANTED_AT[,PROPAGATES]] GRANTED_AT=0|1|2 (0:current
level, 1: Child level, 2: Grand child level), PROPAGATES=true|false
java -jar jenkins-cli.jar ... help group-membership
java -jar jenkins-cli.jar group-membership CONTAINER GROUP [MEMBERS ...]
Displays or sets the membership of a group.
CONTAINER : root | path/to/job-or-folder | path/to/folder/view-name |
slave-name
java -jar jenkins-cli.jar ... help login
java -jar jenkins-cli.jar login
Saves the current credentials to allow future commands to run without explicit credential information. [deprecated]
Depending on the security realm, you will need to pass something like:
--username USER [ --password PASS | --password-file FILE ]
May not be supported in some security realms, such as single-sign-on.
Pair with the logout command.
The same options can be used on any other command, but unlike other generic CLI options,
these come *after* the command name.
Whether stored or not, this authentication mode will not let you refer to (e.g.) jobs as arguments
if Jenkins denies anonymous users Overall/Read and (e.g.) Job/Read.
*Deprecated* in favor of -auth.
java -jar jenkins-cli.jar
Neither -s nor the JENKINS_URL env var is specified.
Jenkins CLI
Usage: java -jar jenkins-cli.jar [-s URL] command [opts...] args...
Options:
-s URL : the server URL (defaults to the JENKINS_URL env var)
-http : use a plain CLI protocol over HTTP(S) (the default; mutually exclusive with -ssh and -remoting)
-ssh : use SSH protocol (requires -user; SSH port must be open on server, and user must have registered a public key)
-remoting : use deprecated Remoting channel protocol (if enabled on server; for compatibility with legacy commands or command modes only)
-i KEY : SSH private key file used for authentication (for use with -ssh or -remoting)
-p HOST:PORT : HTTP proxy host and port for HTTPS proxy tunneling. See https://jenkins.io/redirect/cli-https-proxy-tunnel
-noCertificateCheck : bypass HTTPS certificate check entirely. Use with caution
-noKeyAuth : dont try to load the SSH authentication private key. Conflicts with -i
-user : specify user (for use with -ssh)
-strictHostKey : request strict host key checking (for use with -ssh)
-logger FINE : enable detailed logging from the client
-auth [ USER:SECRET | @FILE ] : specify username and either password or API token (or load from them both from a file);
for use with -http, or -remoting but only when the JNLP agent port is disabled
The available commands depend on the server. Run the help command to
see the list.
java -jar jenkins-cli.jar create-credentials-by-xml STORE DOMAIN