Interview Prep/Jenkins/Architecture, executors & JENKINS_HOME

What is the Jenkins CLI and how do you authenticate it?

BeginnerConceptArchitecture, executors & JENKINS_HOME
Answer

jenkins-cli.jar (downloadable from /jnlpJars/jenkins-cli.jar) issues admin commands over HTTP or SSH. Authenticate with a user and API token, never a password.

java -jar jenkins-cli.jar -s https://jenkins.example.com/ -auth alice:$TOKEN -webSocket who-am-i
java -jar jenkins-cli.jar -s https://jenkins.example.com/ -auth alice:$TOKEN build myjob -p ENV=dev -f -v

-f waits for completion and -v streams the console log.

All Jenkins questions Roadmap: Jenkins

More on Architecture, executors & JENKINS_HOME