Once you have Jenkins up and running you can manage most administrative tasks with a handy cli jar file or by using simple http requests.
Assuming you're running your server on port 8080, obtain the cli jar file like this:
$ wget http://localhost:8080/jnlpJars/jenkins-cli.jar
To see a list of available commands simply run the tool with the help argument:
$ java -jar jenkins-cli.jar -s http://localhost:8080 help > build > Builds a job, and optionally waits until its completion. > clear-queue > Clears the build queue > connect-node > Reconnect to a node > copy-job > Copies a job > ...
In recent versions of Jenkins, typical server operations have been decoupled from the cli tool and are now issued using simple http requests. For example to reload Jenkins instance's configuration, you would just fire a http request at it like this:
$ curl http://localhost:8080/reload
There are three commands of this sort:
- reload Reload server configuration
- restart Restart the server
- exit Close the server down
Issue these in the format:
$ curl http://[jenkins-server]/[command]