-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Unable to upgrade plugin in Docker Jenkins due to version format #1456
Comments
Transferring as this is a bug in the docker project To work around it delete the old version and then upgrade again |
Thanks for the quick reply! I'll work around it by uninstalling the affected plugins. |
Some discussion on gitter explaining the issue: |
Hey @linbjo , I would love to contribute to this under Hacktoberfest. How can i get started? |
Hi @rahulsurwade08 ! Unfortunately I can't answer that. I just found and reported the problem. I'm not a contributor and don't have any insight into the development of this project. Someone who's actively involved might have an idea. |
Hi @linbjo ,I want to work on this and try to solve this. |
docker run -p 8080:8080 -p 50000:50000 |
I want to work on this issue. Please assign me. |
Another issue: SKIPPED plugins/role-strategy.jpi : Image version (587.588.v850a_20a_30162) is older than installed version (587.v2872c41fa_e51) |
SKIPPED plugins/mapdb-api.jpi : Image version (1.0.9-28.vf251ce40855d) is older than installed version (1.0.9.0) |
jenkinsci#1456 fixing update plugins in docker jenkins
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Docker on Linux. Jenkins deployed in Docker using the image
jenkins/jenkins:2.346.3-jdk11
.Reproduction steps
jenkins/jenkins:2.346.3-jdk11
, with Jenkins data saved to a Docker volume.commons-lang3-api:3.12.0.0
plugin.commons-lang3-api:3.12.0-36.vd97de6465d5b_
.Expected Results
The plugin is upgraded to version
3.12.0-36.vd97de6465d5b_
.Actual Results
The plugin is not upgraded. From
$JENKINS_HOME/copy_reference_file.log
:SKIPPED plugins/commons-lang3-api.jpi : Image version (3.12.0-36.vd97de6465d5b_) is older than installed version (3.12.0.0)
Anything else?
Looks like this is due to how the Jenkins Docker image handles version comparisons when installing plugins. https://github.com/jenkinsci/docker/blob/master/jenkins-support contains a function
versionLT()
that does the comparison. It appears to ignore anything behind a dash ('-') unless the main versions (before the dash) are equal. In this case it sorts3.12.0.0
as newer/higher than3.12.0
.Not sure if this should be considered a problem with the plugin version or the Docker image, but it is preventing the upgrade of the plugin. This in turn causes other plugins with dependencies on the new version to fail to load during Jenkins startup (in my case
jira:3.8
).The text was updated successfully, but these errors were encountered: