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.
<jenkins>
<install plugin="build-pipeline-plugin@1.3.3" />
</jenkins>
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.