Jenkins PluginManager API XML Format

Lately I’ve been using Jenkins for Continuous Integration. The REST API is useful, but not documented all that well. If you find yourself wanting to programatically install plugins to the jenkins-server/pluginManager/installNecessaryPlugins API, you have two choices to find the XML format — look through the code, or check out the sample below.

    <install plugin="build-pipeline-plugin@1.3.3" />

The API being liberal in what it accepts means the only part that actually matters is having one element per plugin with an attribute named plugin that has a value of "plugin-id@plugin-version". It can be in a root element named anything you’d like. I think the above reads nicely.

How Do I Backup Jenkins Jobs?

It’s a good idea to backup Jenkins periodically. Many plugins exist with different ideas of how to back up Jenkins configuration. The approach covered in this article shows how to create backups with the Jenkins API and my CI-friendly tool grunt-jenkins.

Read More

  • 1