Reputation: 1954
We are using the official Jenkins docker image to run Jenkins serverless. The docker image contains a install-plugins.sh script that can be fed with a list of plugins and their versions, and is run during the image build.
Although Jenkins warns about outdated plugins in the admin backend, is there any way to update that list (format) easily?
The plugin list format looks like
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.3
aws-credentials:1.28
(...)
credentials:2.3.7
git-client:3.2.1
git-server:1.9
git:4.8.1
and I was hoping for a cli tool or online tool to hand in that list and get info about newer plugin versions and bring them to the newest version easily. Apparently, the Jenkins plugins repository provides this information per plugin at, e.g., https://plugins.jenkins.io/apache-httpcomponents-client-4-api/#releases
Upvotes: 1
Views: 2011
Reputation: 4767
The Plugin Installation Manager Tool will replace a wide range of plugin management tools attempts, and as stated in the Jenkins docker image repository readme, the install-plugins.sh script is deprecated.
I was hoping for a cli tool or online tool to hand in that list and get info about newer plugin versions and bring them to the newest version easily
With Plugin Installation Manager Tool, it's as easy as feeding your existing list into the tool using:
--available-updates:
(optional) Set to true to show if any requested plugins have newer versions available. If a Jenkins version-specific update center is available, the latest plugin version will be determined based on that update center's data.
The readme file has an example how to call it. Remember to specify your plugins-list file as input.
Other helpful options:
--no-download
: (optional) Set to true to not download plugins. By default it is set to false and plugins will be downloaded.
--latest false:
(optional) Set to false to download the minimum required version of all dependencies.
--latest-specified
: (optional) (advanced) Set to true to download latest dependencies of any plugin that is requested to have the latest version. All other plugin dependency versions are determined by the update center metadata or the plugin MANIFEST.MF.
Additional notes:
Both install_plugins.sh
and Plugin Installation Manager Tool will accept just the pluginname (no version) or pluginname:latest, which will retrieve the latest version available when run. See detailed examples.
Both tools will also automatically download dependencies if only the required base plugin is specified. ie: git includes git-client, apache-httpcomponents-client-4-api, credentials, but not aws-credentials (but aws-credentials includes credentials).
The risk is changes in plugin versions can dependencies may add versions or plugins you are not aware of (or you keep obsolete/redundant dependencies). Or there's just a newer dependency. But that can work either way.
It's always good to save the summary of what is downloaded ; you can generate a "complete list" for reference. Our best practice is to use a SPEC list of required plugins to generate a current complete plugin off-line. Both lists are checked into VCS, along with CasC yaml files for each plugin. Use the complete list w/exact version in the instance configuration. Use the SPEC list to consider feature upgrades and the complete list for security issues.
Upvotes: 2
Reputation: 1242
For your purpose Plugin Installation Manager Tool exists.
Check the video how to use it
Upvotes: 0