plugin-installation-manager-tool icon indicating copy to clipboard operation
plugin-installation-manager-tool copied to clipboard

Some bundled plugins are ignored and not updated

Open alindobre opened this issue 4 years ago • 5 comments

Current Jenkins LTS version is 2.263.3. This version has a bouncycastle-api plugin bundled, version 2.16. However, latest version is 2.18. The Jenkins UI reveals this:

Screenshot 2021-02-04 at 16 43 07

However, running plugin manager 2.5.0 (latest) doesn't update it:

$ cd /tmp

$ curl -OLs https://get.jenkins.io/war-stable/2.263.3/jenkins.war

$ curl -OLs https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/2.5.0/jenkins-plugin-manager-2.5.0.jar

$ java -jar jenkins-plugin-manager-2.5.0.jar --war jenkins.war --list | grep bouncy # no ouput here

$ java -jar jenkins-plugin-manager-2.5.0.jar --war jenkins.war --available-updates
No available updates

Same happens with the command-launcher and jdk-tool plugins, both bundled in the latest LTS.

Later edit note: adding the plugin explicitly to the command line i.e. via --plugins bouncecastle-api will find the latest 2.18 version and download it. But the problem is that it doesn't detect the bundled version.

alindobre avatar Feb 04 '21 16:02 alindobre

It seems detached plugins are explicitly excluded from any lists - but I can't find any documentation to explain why: https://github.com/jenkinsci/plugin-installation-manager-tool/blob/master/plugin-management-library/src/main/java/io/jenkins/tools/pluginmanager/impl/PluginManager.java#L1469-L1474

dominykas avatar Oct 12 '21 15:10 dominykas

Available updates only works on plugin files not the jenkins war itself so it won't be too useful here.

Not sure if it's intentionally excluded, most likely just not implemented.

timja avatar Oct 12 '21 15:10 timja

Available updates only works on plugin files not the jenkins war itself

Not sure I understand? I do not know whether it's possible to inspect the war to read the included versions and see if there's updates via the CLI (in general), but the updates definitely show up in the Jenkins Update Center, so there must be a way?

I ran into this today. To solve it I added the deps that are normally bundled into the war into my plugins.txt - they get installed properly that way, and I assume any pending updates would also show up?

dominykas avatar Oct 12 '21 19:10 dominykas

I mean this CLI tool does not inspect your installed versions in any way, it just processes a plugins.txt file.

I ran into this today. To solve it I added the deps that are normally bundled into the war into my plugins.txt - they get installed properly that way, and I assume any pending updates would also show up?

Yes that is the normal workflow

timja avatar Oct 12 '21 19:10 timja

Yes that is the normal workflow

Glad to know I'm not crazy 😂

This workflow does have the downside for the fully automated situations, where nobody ever looks into the Update Center - I was not even aware "detached plugins" are even a thing and I was very confused to not even see these via the --list, etc.

Thanks for filling in the missing info 👍 I probably do not have the capacity to learn how to implement this, but I might look into updating the README or smth.

dominykas avatar Oct 12 '21 19:10 dominykas