I would like to know, how can I install a plugin to Jenkins, using the Jenkins Remote access API? I found a way to install using jenkins CLI. But I need to know how to do the same using API. I tried using jenkins-python library. But I did not find any way to install plugin there.
Send (HTTP POST) the following xml data (with your plugin-id@version) to Jenkins plugin manager. Check out my jenkins install plugin script on gist.
This HTTP POST request install jenkins git plugin 2.0.
curl -X POST -d '<jenkins><install plugin="[email protected]" /></jenkins>' --header 'Content-Type: text/xml' http://localhost:8080/pluginManager/installNecessaryPlugins
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With