Closed jenkins-infra-bot closed 4 years ago
Hi all,
First thank you for the job you make on Jenkins, that's amazing.
Regarding this change, I think it breaks my pipeline. Indeed previously the page mirrors.jenkins.io/war/ provided me with the list of weekly release thus I was able to get the latest version with :
env.JENKINS_VERSION = sh(
script: 'curl http://mirrors.jenkins.io/war/ | grep -oE ">[0-9]\\.[0-9]+
.?[0-9]*" | tail -1 | sed \'s/>//\'',
returnStdout: true
).trim()
With the new UI i can no longer do this. Is there an URL from which I will be able to automatically get the latest weekly version number ?
I wrote a tool to download either the latest weekly or the latest stable version directly from the maven repository repo.jenkins-ci.org, basically it fetches the version from a metadata.xml
https://github.com/jenkins-infra/release/blob/master/utils/getJenkinsVersion.py
Otherwise, I wrote another tool to automatically bump Jenkins docker image tag in yaml files using this tooltool with of the two configurations
I just updated how the Jenkins infrastructure project automates its Jenkins version update for docker images.
I will already have my own mechanism to build the jenkins image, the only think i need is a light way to get the weekly version. I fix this issue in modifying the code with :
curl https://github.com/jenkinsci/jenkins/releases/latest 2>/dev/null | grep -oE "[0-9]
.[0-9]*"
However I am not sure it will target only the weekly. Is there an easy way to get a weekly version from a simple command line (curl, wget) ?
PS : Thank you for your help
I am pretty sure that the latest Github release will return the latest version release no matter it's weekly or stable. You could add a check to verify if the version match X.Y or X.Y.Z where X.Y is a weekly and X.Y.Z is stable which is a convention used on the project.
You could also use this file and parse the xml, in this case latest is always the latest release.
This is what I am using in this python script getJenkinsVersion.py where you can either return the latest version or download the latest war file.
The release why I prefer to fetch this information from the maven repository is because it's the source of truth, it's the first place to be updated when we release a new version.
There's probably more improvements to be done but that should be follow up tickets, this has been live for a few weeks now
The Jenkins mirror infrastructure is getting a bit outdated and would need some refactoring
Ps: Mirrorbrain doesn't seem to be maintained anymore link
I started a discussion here
Originally reported by olblak, imported from: Modernize mirrors.jenkins.io