Each time I restart jenkins (running in kubernetes) it tries to automatically update all its plugins and usually it fails and I need to debug and update the plugins. Could be nice to better control/plan this.
The first time jenkins starts it will read the plugins I need from
/plugins/plugins.txt and download to a PVC. After that when/if jenkins restarts it will check if plugins exits on the the PVC and just use those instead of re-downloading.
But for some reason jenkins still tries to update the plugins and usually fails because some broken changes have been introduced.
I have tried to update the script that runs on jenkins startup to:
jenkins-plugin-cli --war "/usr/share/jenkins/jenkins.war" --plugin-file "/app-config/plugins.txt" --latest false --verbose
And an example of my plugin.txt file:
plugins: blueocean: "1.25.2" bouncycastle-api: "2.25" cobertura: "1.17" configuration-as-code: "1.55" git-parameter: "0.9.14" kubernetes: "1.30.11" kubernetes-credentials-provider: "0.20" multibranch-build-strategy-extension: "1.0.10" pipeline-utility-steps: "2.11.0" ssh-steps: "2.0.0" ssh-agent: "1.23" startup-trigger-plugin: "2.9.3" timestamper: "1.15" uno-choice: "2.5.7"
Any suggestions on how to disable auto update on jenkins restart??
Also ideally I would like to avoid micro-managing the plugin dependency tree and updating versions manually through trial and error by inspecting the log at startup like:
io.jenkins.tools.pluginmanager.impl.AggregatePluginPrerequisitesNotMetException: Plugin prerequisite not met: Plugin timestamper:1.17 depends on antisamy-markup-formatter:2.7, but there is an older version defined on the top level - antisamy-markup-formatter:2.6 at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:223) at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:172)