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.
More on Architecture, executors & JENKINS_HOME
What are the main components of a Jenkins installation?BeginnerWhat is the difference between a node, an agent and an executor?BeginnerWhy should the built-in node have 0 executors?BeginnerWhat is `JENKINS_HOME` and what are its most important contents?BeginnerWhat happens if you lose the `secrets/` directory but keep `credentials.xml`?AdvancedHow does an agent communicate with the controller?Intermediate