fix: prevent images publication if not latest Weekly or LTS#2252
Conversation
9d04933 to
61cc78d
Compare
| $env:LATEST_LTS = $isJenkinsVersionLatest | ||
| } else { | ||
| $env:LATEST_WEEKLY = $isJenkinsVersionLatest |
There was a problem hiding this comment.
Setting those env vars there and moved that block under the new Test-IsLatestJenkinsRelease as they will certainly help wrt #2242 (Windows images publication is not using .ci/publish.sh nor it currently has a proper equivalent)
There was a problem hiding this comment.
FWIW, I'm looking into getting rid of most of make.ps1 code by using docker buildx instead of docker compose to build Windows images, but I need to complete my initial testing first.
61cc78d to
41b3856
Compare
timja
left a comment
There was a problem hiding this comment.
Looks ok, as I said on matrix I don't think this will help much as the tags will build whats in them at the tagged time.
Indeed. Potentially useful for future mistakes/surprises? |
|
Still interested in integrating some of those changes into make.ps1: the retrieval of latest Weekly & LTS from Artifactory to properly set Extracting that and the complete fix in a distinct PR. |
Yes it should fix it going forward but I expect the issue is from a long time ago. |
|
OK, merging it then. |
+1 with Tim. The unwanted publication is a Jenkins build trigger bug and shall be fixed where the problem is (e.g. not in the pipeline and not in the tooling) This PR does not fix anything related to unwanted publication and it will only bite us in the future by adding new corner case only for publication while we already struggle to align ci.jio and trusted.ci.jio. I would suggest to revert this change and open a PR with only the changes which seem useful for you in regard to your work on the tooling, with explanation on the purpose. |
All good points! Opened #2257 I'll cherry-pick |
See #2242 (comment) 🙂 |
This change prevents the publication of images if
JENKINS_VERSIONis not the latest Weekly nor the latest LTS, to avoid unexpectedly republishing old tags.In case we would need to publish an image with a
JENKINS_VERSIONnot in https://repo.jenkins-ci.org/releases/org/jenkins-ci/main/jenkins-war/maven-metadata.xml,BYPASS_ONLY_LATEST_PUBLICATIONcan be set totrue.Ref:
#jenkinsci/releasegitter channel: https://matrix.to/#/!JlkqzpdEnsUUuVtjgE:matrix.org/$Umz_fnStdhmzhPD4RGasDXt8L_nIHD4jiB8wxCR-9Qg?via=matrix.org&via=gitter.imTesting done
.ci/publish.sh
./make.ps1
Submitter checklist