Jenkins CLI

# command overview
http://jenkins.example.com:8080/cli/

# add public key for user
http://jenkins.example.com:8080/me/configure

# authentificate by user / pass
java -jar jenkins-cli.jar -s http://jenkins.example.com:8080/ list-jobs --username --password

# install plugin by name
java -jar jenkins-cli.jar -s http://jenkins.example.com:8080/ install-plugin findbugs

# install plugin from URL?
java -jar jenkins-cli.jar -s http://jenkins.example.com:8080/ install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi

# restart jenkins
java -jar jenkins-cli.jar -s http://jenkins.example.com:8080/ safe-restart

# get Jenkins version
java -jar jenkins-cli.jar -s http://jenkins.example.com:8080/ version

# list plugins
java -jar jenkins-cli.jar -s http://jenkins.example.com:8080/ list-plugins

# list all plugins
java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://127.0.0.1:8080/ list-plugins

# install locale plugin from command line
wget -q https://updates.jenkins-ci.org/latest/locale.hpi -O /var/lib/jenkins/plugins/locale.hpi
wget http://dl.panticz.de/jenkins/locale.xml -O /var/lib/jenkins/locale.xml
/etc/init.d/jenkins restart

# webhook
http://jenkins.example.com/gitlab/build_now