-
Notifications
You must be signed in to change notification settings - Fork 200
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_UC_DOWNLOAD_URL usage logic incorrect #415
Comments
Fixing the same issue as highlighted here jenkinsci/docker#1299 |
I don't understand this change, this is exactly how it works after #375 . |
That code doesn't appear to fully work in all situations. But I've just patched it locally so I'm good. I was just trying to help out others. |
AH, no, I see what you did. My bad. |
wouldn't the correct solution here to use |
When I read the README, JENKINS_UC_DOWNLOAD_URL is listed as the way to download all of your plugins through a specific mirror. But the behavior of the code does not reflect this. Either the README needs to be updated or a solution like #416 would be better. From the README:
It does not mention that there is also a check for existence of |
This is a very annoying issue if you want to download artifacts from Artifactory as well. If I pass in the Artifactory url it shouldn't slice my url, and then randomly append /download/plugins to it. It should accept the exact url at least up to the standard folder format for the plugin. What was the workaround if there is no fix? |
Been using the plugin manage cli with Artifactory for a while using the following setup: JENKINS_UC=https://artifactory.example.com/artifactory/jenkins-update-center/dynamic-stable-2.414.3/update-center.json
# don't really use these but set them anyway
JENKINS_UC_DOWNLOAD_URL=https://artifactory.example.com/artifactory/jenkins-update-center/download/plugins
JENKINS_UC_EXPERIMENTAL=https://artifactory.example.com/artifactory/jenkins-update-center/experimental/update-center.json
JENKINS_INCREMENTALS_REPO_MIRROR=https://artifactory.example.com/artifactory/jenkins-update-center/incrementals
JENKINS_PLUGIN_INFO=https://artifactory.example.com/artifactory/jenkins-update-center/current/plugin-versions.json If a custom plugin is required it happens on per plugin override basis in the plugins spec. The provided download url overrides all other UC configurations.
Note that Artifactory doesn't support the dynamic plugin folder resolution that the plugin manager attempts to perform so we have to resolve it first and explicitly include it in the https updates.jenkins.io/update-center.json version==${LTS_VERSION} -h | grep Location Another issue with Artifactory is once it caches Artifactory generic repository cache characteristics combined with Jenkins dynamic plugin folders definitely make this whole process a bear, but it is possible. Hope this helps. |
Thanks. I just set JENKINS_UC_DOWNLOAD to https://artifactory.example.com/artifactory/ and created a virtual repo from there at the default path to my Jenkins plugin remote repo. I'm fine with it querying the internet for the plugin-versions.json and update-center.json, just want it to scan the plugin downloads with X-ray. |
Jenkins and plugins versions report
Environment
jenkins-plugin-manager-2.13.0.jar
What Operating System are you using (both controller, and any agents involved in the problem)?
n/a
Reproduction steps
Expected Results
Download attempt from;
http://localhost:8080/jenkins/my-plugin/1.2.3/my-plugin.hpi
Actual Results
Download attempt from;
https://updates.jenkins.io/download/plugins/my-plugin/1.2.3/my-plugin.hpi
Anything else?
No response
The text was updated successfully, but these errors were encountered: