Installing Jenkins Plugins From the Commandline

To make it easier to write provisioning scripts, I looked for a way to use the commandline to install Jenkins plugins. This is what is working for me:

Terminal
1
vagrant@precise64:/run/jenkins/war/WEB-INF$ java -jar jenkins-cli.jar -s http://127.0.0.1:8080/ install-plugin git

Worked like a charm…you might have to restart Jenkins afterwards (java -jar jenkins-cli.jar -s http://127.0.0.1:8080/ restart is one way…)

Comments