plugin-installation-manager-tool
plugin-installation-manager-tool copied to clipboard
Version 2.0.1 incorrectly resolves required versions in dependencies
Looks like there is a regression after switching to "download latest by default" in 2.0.0
2020-09-17 11:49:21
Step 4/4 : RUN java -jar /app/bin/jenkins-plugin-manager.jar --war /app/jenkins/jenkins.war --plugins docker-workflow:1.22 workflow-durable-task-step:2.35
2020-09-17 11:49:21
2020-09-17 11:49:21
---> Running in 90ef99b3c292
2020-09-17 11:49:22
Unable to open /app/jenkins/jenkins.war
2020-09-17 11:49:22
Unable to get version from war file
2020-09-17 11:49:26
War not found, installing all plugins: /app/jenkins/jenkins.war
2020-09-17 11:49:26
Plugin docker-workflow:1.22 depends on workflow-durable-task-step:2.36, but there is an older version defined on the top level - workflow-durable-task-step:2.35
At the same time, even the most recent release of Docker Pipeline plugin requires 2.35:

We're running into this issue as well, we've pinned the versions of all plugins including their (transitive) dependencies in plugins.txt and our build just failed because one plugin (let's call it plugin a) now pulls in a newer dependency of plugin b than the dependency that's defined in it's POM and in our plugins.txt, probably because there's a new release of plugin a which depends on a newer version of plugin b.
[edit] We've switched back to the install-plugins.sh script for now, that still works correctly.
Yeah it’s a bit of a pain, possibly the error should be relaxed if there’s a compatible version declared elsewhere in the file.
We’ve been working around it by using the available-updates flag to update our file for us when that happens
Unfortunately the --available-updates runs afoul of #169 when you are using LTS
I’ll try look at issues in this repo soon, patches very welcome though
To answer your questions, yes it should only pull the latest available for the Jenkins Core I am running. Turning --latest false is very much a pain as I now have to iteratively correct the version numbers of my plugins until I have a working configuration.
It already does that, but Jenkinsfile runner is probably messing with it
see explanation here: https://github.com/jenkinsci/plugin-installation-manager-tool/issues/219#issuecomment-727538514
I think I saw a log message saying the plugin-manager could not determine the version of Jenkins from the war file. I'm not sure how it checks that.
That’s the cause of it for you then
Jenkinsfile Runner is not really "messing" with it. Taking the packaging, there is just no Jenkins WAR which could be really used to retrieve the version as documented here: https://github.com/jenkinsci/plugin-installation-manager-tool/blob/master/plugin-management-library/src/main/java/io/jenkins/tools/pluginmanager/impl/PluginManager.java#L1064-L1072 . An alternative solution is needed, and it is going to be a problem with recent plugin releases requiring new core versions. I will create a patch