Hi, I've set the following environment variables:
- name: JENKINS_UC value: "http://updates.jenkins.io" - name: JENKINS_UC_EXPERIMENTAL value: "http://updates.jenkins.io/experimental" - name: JENKINS_INCREMENTALS_REPO_MIRROR value: "http://repo.jenkins-ci.org/incrementals" - name: JENKINS_PLUGIN_INFO value: "http://updates.jenkins.io/plugin-versions.json"
- name: JENKINS_UC_DOWNLOAD value: "http://updates.jenkins.io/download"
kubernetes-client-api:4.13.3-1because its next version (5.4.1) has breaking API changes for
kubernetes:1.27.7which is the latest version that can run on my Jenkins v2.249.3. As somewhat expected I am getting
Plugin kubernetes:1.27.7 depends on kubernetes-client-api:5.4.1, but there is an older version defined on the top level - kubernetes-client-api:4.13.3-1while my jenkins is starting up and preloading plugins.
--latest falseflag also doesn't work for me since it results in much lower versions for multiple other plugins.
Yea that's a red herring that threw me off. What we are seeing is the wrong minimum dependency version being required.
The active-directory:2.23 plugin depends on configuration-as-code:1.35 pom.xml. However the CLI is claiming it needs 1.51:
$ java -jar jenkins-plugin-manager-2.10.0.jar --jenkins-version 2.277.3 --plugins active-directory:2.23 configuration-as-code:1.46 War not found, installing all plugins: C:\ProgramData\Jenkins\jenkins.war Plugin prerequisite not met: Plugin active-directory:2.23 depends on configuration-as-code:1.51, but there is an older version defined on the top level - configuration-as-code:1.46
--latest false. However, that usually also means that you then need to define the precise version of all your plugins. The plugin installation manager tool wants to offer you the most recent versions of unspecified plugins that are compatible with your Jenkins core version. Refer to jenkinsci/plugin-installation-manager-tool#250 for more details about the behavior
2.9.2-29.v717aac953ff3, which is the same version required by JCasC. However,
1.78, the current latest version) seems to want to install
2.9.1-23.v51c4e2c879c8. Looking at the
script-security, it doesn't seem to specify a version for
caffeine-apiversion there, so I have no idea why it picks that version, and then why this version gets used instead of the version that I explicitly requested in
--latest false, in case that should make a difference.
java -jar /opt/jenkins/lib/jenkins-plugin-manager-2.11.1.jar --plugin-download-directory /tmp/plugins --plugin-file /opt/jenkins/config/plugins.yaml --war /opt/jenkins/lib/jenkins-2.319.1.war --latest false --verbose
The Jenkins that starts from your plugins.yaml file works well for me with the following commands:
$ rm -rf plugins $ mkdir plugins $ java -jar ../jenkins-plugin-manager-2.11.1.jar --jenkins-version 2.319.1 --latest false --plugin-download-directory plugins --plugin-file plugins.yaml $ JENKINS_HOME=. java -jar ../jenkins-2.319.1.war
When the Jenkins install wizard appears after those commands, I choose to install no additional plugins. As far as I can tell, it is running the versions of plugins that are specified in the plugins.yaml file without any complaint. I wonder if your
/tmp/plugins directory might not be empty and the existing files are causing some difference in behavior compared to what I see? I didn't check every plugin version, but I did confirm there are several plugins that need updates.
/tmp/pluginsbefore running the tool to ensure there is no stale data from a previous deployment. After we run the plugin manager tool, we copy everything from
/tmp/pluginsto the Jenkins plugins directory (we do this because we are using Ansible and we want to see which plugins were changed during the copy). So in addition to the stuff in
plugins.yaml, we are installing a few other plugins by hand, namely
snakeyaml-api@ 1.29.1, JCasC @1.55,
caffeine-api@ 2.9.2-29.v717aac953ff3.hpi, and two custom plugins specific to my company. These plugins are copied directly to the Jenkins plugin directory after running the tool.
caffeine-api, and the canonical one is the older one, so JCasC won't start.
script-security depends on: caffeine-api 2.9.1-23.v51c4e2c879c8 Setting checksum for: caffeine-api to W8xSQEQ+gm6jmyWP1n5sSX+71OxHoxb7y939vfS8h2s=