Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 22 13:23
    timja commented #448
  • Jun 22 13:03
    MarkEWaite commented #448
  • Jun 22 08:06
    timja commented #448
  • Jun 22 08:03
    timja commented #448
  • Jun 21 20:57
    cronik ready_for_review #448
  • Jun 21 18:52
    cronik synchronize #448
  • Jun 21 18:25
    cronik synchronize #448
  • Jun 21 14:07
    cronik synchronize #448
  • Jun 21 14:00
    cronik commented #448
  • Jun 21 08:05
    timja commented #448
  • Jun 21 08:05
    timja labeled #448
  • Jun 20 22:38
    cronik opened #448
  • Jun 20 22:38
    cronik edited #448
  • Jun 20 22:33
    cronik commented #415
  • Jun 20 10:21
    timja commented #447
  • Jun 20 10:21
    timja closed #447
  • Jun 20 09:14
    Umar9052 commented #447
  • Jun 20 09:14
    Umar9052 edited #447
  • Jun 20 09:14
    Umar9052 opened #447
yr-sudhakar
@yr-sudhakar
Hi @oleg-nenashevm,
Thanks for assigning you and @timja as reviewers. I intended to do the same. Maybe I do not have the aurthority to do the same, since I did not find any obvious way to assign when I was creating the JIRA issue.
4 replies
@oleg-nenashev and @timja do you think it is a good idea to name the binary jenkins-plugin-manager and the script jenkins-plugin-manager-script. This will help the user to identify easily as jenkins tools in their custom "scripts". Rename the tool to Plugin Manager (Tool) in the documentation, since, the tool does a lot more than just installing the plugin.
Tim Jacomb
@timja
scripts do not have a suffix of -script
so no -1
Oleg Nenashev
@oleg-nenashev
@yr-sudhakar Hi, thanks for working on that! I agree with @timja
yr-sudhakar
@yr-sudhakar
@MarkEWaite As part of the tool user guide review, you indicated that the plugin manager tool does not function as expected in some cases. If you can be specific, I can see if it impacts the content of the document.
@MarkEWaite When I am documenting the tool, I am not making an effort to take about plugin management per se, The documentĀ“s focus is to document the functionality of the tool from a user perspective.
holmesb
@holmesb

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"

Yet still (according to the log), it is trying to download plugins from https://get.jenkins.io:
"Tried downloading <plugin> from https://get.jenkins.io/plugins/<plugin>"

Any ideas?

Tim Jacomb
@timja
you need to override JENKINS_UC_DOWNLOAD if you want to change the download url, the update center includes download links which will be pointing to get.jenkins.io
what are you trying to achieve though? you have some weird proxy that doesn't work with ssl?
holmesb
@holmesb
done, still "Tried downloading <plugin> from https://get.jenkins.io/plugins/" with:
- name: JENKINS_UC_DOWNLOAD
  value: "http://updates.jenkins.io/download"
Yes I'm behind proxy that does a man-in-the-middle attack. Easiest way around is to use http endpoints instead of https
Proper solution would be to add the company CA certificate to trusted store. Perhaps I should try that instead. "Easy" option isn't turning out to be very easy
:-)
"add the company CA certificate to trusted store" - hopefully the helm chart I'm using allows this...
Tim Jacomb
@timja
yes that's what I would suggest doing instead, you can just build a custom docker image is the easiest solution which includes your company cert
Neil H Watson
@neilhwatson
Question about the plugin manager. When I run this command on a fresh Jenkins install, I see plugins being downloaded, but after I see no plugins installed in the UI
        java -jar /usr/share/jenkins/jenkins-plugin-manager.jar \
          --plugin-file /usr/share/jenkins/plugins.txt
Graeme Wilson
@techlunacy
@neilhwatson you need to restart jenkins after the installation. maybe you could get away with a reload? or are you running before it starts?
pashcan
@pashcan
Howdy folks, any insight on how I can pin just one specific plugin version which is a dependency of another plugin? Specifically need to pin down kubernetes-client-api:4.13.3-1 because its next version (5.4.1) has breaking API changes for kubernetes:1.27.7 which 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-1 while my jenkins is starting up and preloading plugins.
I am aware that I should upgrade so i can ran up-to-date dependencies, but having ability to pin just one or two dependencies would be super neat. Alternative of running jenkins-plugin-manager with --latest false flag also doesn't work for me since it results in much lower versions for multiple other plugins.
7 replies
CocoVicky
@CocoVicky
image.png
Hi guys. So i'm trying to install git plugin for jenkins and i obtain this
turns out i have to manually install all of those plugins first
so i tried this command java -jar C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\jenkins-plugin-manager-2.9.2.jar --war C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\war --plugin-file C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\plugins.txt --plugins delivery-pipeline-plugin:1.3.2 deployit-plugin
and i obtain this error Error getting update center json
do you guys have an idea of what i should do please?
And sorry for annoying
Mark
@MarkRx
Hello - when hitting https://updates.jenkins.io/update-center.json?version=2.277.3 I get redirected to https://updates.jenkins.io/dynamic-stable-2.277.3/update-center.json which serves up the update json for 2.289.2. I believe this is causing the plugin manager CLI to pull in "latest" for 2.289.2 instead of being restrained to "latest" of 2.277.3. Where can I get the 2.277.3 update-center.json file? I can't seem to find it anywhere.
Tim Jacomb
@timja
@MarkRx it's not 2.289.2 it's showing you the recommended version for your release line
Mark
@MarkRx

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
Mark
@MarkRx
This appears to have broke with 2.6.0. It works when using 2.5.0.
Mark Waite
@MarkEWaite
If your intent is to install the exact version specified in the plugins.txt file, then you need the argument --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
Mark
@MarkRx
I still want transitive undeclared dependencies to be latest. I think If the plugins are pinned then my pin should be used. If that results in a conflict it should fail.
Nik Reiman
@nre-ableton
So I'm trying to fix a weird issue with the plugin-installation-manager-cli-tool and dependency resolution. The short story is that JCasC won't load because the version of caffeine-api is too old. The plugins.yaml file pins caffeine-api to 2.9.2-29.v717aac953ff3, which is the same version required by JCasC. However, script-security (pinned to 1.78, the current latest version) seems to want to install 2.9.1-23.v51c4e2c879c8. Looking at the pom.xml file for script-security, it doesn't seem to specify a version for caffeine-api version 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 plugins.yaml.
2 replies
Also I should note that we are running the tool (version 2.11.1) with --latest false, in case that should make a difference.
Tim Jacomb
@timja
it'll be getting the version from the jenkins plugin bom: https://github.com/jenkinsci/bom
Nik Reiman
@nre-ableton
Ahh interesting. Ok, this particular Jenkins hasn't been updated yet, it's still on 2.303.3. I'll try forwarding it to 2.319.1.
Mark Waite
@MarkEWaite
I would be surprised if there were any difference between 2.303.3 and 2.319.1 in this case.
Nik Reiman
@nre-ableton
Yeah, unfortunately, 2.319.1 has the same problem. Damn, so much for a silver bullet. :)
And the corresponding command to install plugins is: 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
Mark Waite
@MarkEWaite

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.

Nik Reiman
@nre-ableton
@MarkEWaite We delete /tmp/plugins before 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/plugins to 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.
So we somehow end up with two versions of caffeine-api, and the canonical one is the older one, so JCasC won't start.
In the log for the plugin installation tool step, I see this output:
script-security depends on: caffeine-api 2.9.1-23.v51c4e2c879c8 Setting checksum for: caffeine-api to W8xSQEQ+gm6jmyWP1n5sSX+71OxHoxb7y939vfS8h2s=
@MarkEWaite I would be interested in seeing your logfile to see what script-security wants
Mark Waite
@MarkEWaite
@nre-ableton maybe you're mistakenly copying both an hpi and a jpi file into the plugins directory?
I don't see that message string when I run with the --verbose option. What option do you use to generate that output?
Roman
@itdtin
Hi everyone! How can i install and configure allure into jenkins, which installed on host without internet?
Mark Waite
@MarkEWaite
@itdtin see https://www.jenkins.io/doc/book/installing/offline/ for the current best suggestions for offline installation.
Manshu Sharma
@Svastikkka
Hi everyone, Has anyone have done any POC for this issue jenkinsci/plugin-installation-manager-tool#93.
Tim Jacomb
@timja
not that i'm aware of