-
Notifications
You must be signed in to change notification settings - Fork 890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jenkins plugins not getting upgraded through helm chart #1115
Comments
Even I am facing the same issue |
Same here |
Have any of you tried adding this to your helm values?
|
I noticed this as well. The script that the
I see multiple issues with this: |
@nkazarian-spokeo Correct. I was confused about the same thing. I also had to manually run extra commands to copy the upgraded plugins to the JENKINS_HOME plugins directory. |
Which script are you guys talking about and running in which container? /var/jenkins_plugins does exist on the init container mounted from the volume plugin-dir. Then that volume gets mounted to /usr/share/jenkins/ref/plugins on the main jenkins container. Ie there's a multi-step process going on here to prepare the plugins for consumption by the final jenkins container. |
In the main Jenkins container at startup it runs this (https://github.com/jenkinsci/docker/blob/master/jenkins-support#L42) to copy plugins. If you follow the logic there you will see why I suggested adding the environment variables in comment #1115 (comment). |
Then maybe something with the |
The second script (in the main Jenkins container) refuses to upgrade extensions if you ever install or upgrade them from the web user interface. That’s the default “as designed” behavior. But if you set the environment variables from my prior comment then it will go ahead and upgrade them anyway. If you check the ${JENKINS_HOME}/copy_reference_file.log you should see messages saying it skipped your plugin upgrades. I think the real issue is this behavior needs to be better documented. It certainly took me a while to figure this out on my production system. |
Correct if you ever upgrade them in the Web UI they won't be upgraded, Its documented here: https://github.com/jenkinsci/docker#upgrading-plugins
|
@timja I think it would be helpful if there was some commentary about it in the Helm chart documentation, at least pointing to the link you gave and an example of setting the environment variables in the Helm values. Would you be open to either adding that or accepting a pull request? |
Happy to accept a pull request. |
Describe the bug
We have deployed Jenkins in a Kubernetes cluster using the Jenkins helm chart. When we want to upgrade the LTS version of a Jenkins instance, we also want to upgrade the plugins. As part of the helm upgrade, we pass in a plugins.txt file with the list of plugins and plugin versions we would like to upgrade to. We also specify the jenkins LTS version to upgrade to.
Then we execute the helm upgrade command.
The problem we're seeing is that sometimes the plugins do not get upgraded while the LTS version does. This does not happen on all the instances we have, only some. It is not clear why the plugins remain at the same version. In the init container, we see the logs of the new plugins getting downloaded and copied to the shared directory /var/jenkins_plugins. Is there a recommended way to upgrade the plugins through the helm chart? It would also be helpful to know if there's something we can do to debug this situation. We are not seeing any helpful logs in the jenkins-master container. Thanks in advance.
Version of Helm and Kubernetes
Chart version
Our chart is from a few years ago. I'm not sure of the exact version.
What happened?
What you expected to happen?
The newly downloaded jenkins plugins should be loaded into the Jenkins instance, but they remain using the previous versions.
How to reproduce it
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: