Installing Jenkins Plugins with their Dependencies in One Step

Assuming that your Jenkins server is listening at port 8080, all you need to do is to run the following curl command:

$ curl -X POST -d '<jenkins><install plugin="[email protected]" /></jenkins>' --header 'Content-Type: text/xml' http://localhost:8080/pluginManager/installNecessaryPlugins

Replace [email protected] with the name of your plugin you’re trying to install by looking for the plugin-id in the plugin’s page.

ie for Docker Build Step, the Plugin ID listed on the page is docker-build-step

So your curl script should look something like:

$ curl -X POST -d '<jenkins><install plugin="[email protected]" /></jenkins>' --header 'Content-Type: text/xml' http://localhost:8080/pluginManager/installNecessaryPlugins

Always use @current for the latest version of the plugin.

Also, do not be alarmed if you DO NOT SEE any response on your curl request. Its normal.

Just go to your Update Center at http://jenkins/updateCenter/ and you should see your plugins being installed.