-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins master running in Docker based on jenkins:lts-centos7-jdk11
PLUGINS_FORCE_UPGRADE=true
Description
The choice of naming for versions of the JUnit plugin is causing issues with the plugin upgrade script used by the official Docker images.
The recommended method of upgrading plugins, as per the Docker image documentation, is to use jenkins-plugin-cli. The parameter PLUGINS_FORCE_UPGRADE then dictates if installed modules should be upgraded when new plugins are included in the Docker image. This is done by first downloading the new plugins, using jenkins-plugin-cli, to /usr/share/jenkins/ref and then using the jenkins-support script to copy over newer versions of plugins to the JENKINS_HOME/plugins folder. This support script uses sort -V to determine if the version is newer or not.
When comparing versions 1119.va_a_5e9068da_d7 (older) and 1119.1121.vc43d0fc45561 (newer) the following is determined by the support script:
SKIPPED plugins/junit.jpi : Image version (1119.1121.vc43d0fc45561) is older than installed version (1119.va_a_5e9068da_d7)
The same result occurs when running the comparison command manually
$ echo -e "1121.vc43d0fc45561\nva_a_5e9068da_d7" | sort -V | head -n1
1121.vc43d0fc45561
Expected Behaviour
JUnit plugin versioning is named in a way that is compatible with sort -V
Workaround
Installing the new versions of the plugins via the web UI or by passing the additional parameter
--plugin-download-directory $JENKINS_HOME/plugins
to jenkins-plugin-cli in order to bypass the use of the temporary folder as well as the jenkins-support script.