Skip to content
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

fix(Windows): remove duplication in tags #547

Merged
merged 3 commits into from
Oct 30, 2023

Conversation

lemeurherve
Copy link
Member

@lemeurherve lemeurherve commented Oct 26, 2023

This PR fixes #546 by including the remoting and build number tag by default, as we're always publishing tags the same way, with -PushVersion (will be the subject of a follow-up PR).

Testing done

Validation of the fix by comparing the outputs of the following command:

DOCKERHUB_ORGANISATION="jenkins4eval" IMAGE_TYPE="nanoserver-ltsc2022" && \
pwsh build.ps1 -PushVersion -RemotingVersion 3186.vc3b_7249b_87eb_ -BuildNumber 1 -DisableEnvProps publish -DryRun

Before (output lines deduplicated)

= BUILD: Building all images...
 (dry-run) docker-compose --file=build-windows.yaml build --parallel --pull
 = BUILD: Finished building all image
 = PUBLISH: (dry-run) docker tag then publish 'jdk21-nanoserver-ltsc2022 jenkins4eval/agent:jdk21-nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk21-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-jdk21-nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk21-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-3186.vc3b_7249b_87eb_-1-jdk21-nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk11-nanoserver-ltsc2022 jenkins4eval/agent:jdk11-nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk11-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-jdk11-nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk11-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-3186.vc3b_7249b_87eb_-1-jdk11-nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk17-nanoserver-ltsc2022 jenkins4eval/agent:jdk17-nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk17-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-jdk17-nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk17-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-3186.vc3b_7249b_87eb_-1-jdk17-nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk17-nanoserver-ltsc2022 jenkins4eval/agent:nanoserver-ltsc2022'
 = PUBLISH: (dry-run) docker tag then publish 'jdk17-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-nanoserver-ltsc2022'
 Build finished successfully

After

= BUILD: Building all images...
(dry-run) docker-compose --file=build-windows.yaml build --parallel --pull
= BUILD: Finished building all images
= PUBLISH: (dry-run) docker tag then publish 'jdk21-nanoserver-ltsc2022 jenkins4eval/agent:jdk21-nanoserver-ltsc2022'
= PUBLISH: (dry-run) docker tag then publish 'jdk21-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-jdk21-nanoserver-ltsc2022'
= PUBLISH: (dry-run) docker tag then publish 'jdk11-nanoserver-ltsc2022 jenkins4eval/agent:jdk11-nanoserver-ltsc2022'
= PUBLISH: (dry-run) docker tag then publish 'jdk11-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-jdk11-nanoserver-ltsc2022'
= PUBLISH: (dry-run) docker tag then publish 'jdk17-nanoserver-ltsc2022 jenkins4eval/agent:jdk17-nanoserver-ltsc2022'
= PUBLISH: (dry-run) docker tag then publish 'jdk17-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-jdk17-nanoserver-ltsc2022'
= PUBLISH: (dry-run) docker tag then publish 'jdk17-nanoserver-ltsc2022 jenkins4eval/agent:nanoserver-ltsc2022'
= PUBLISH: (dry-run) docker tag then publish 'jdk17-nanoserver-ltsc2022 jenkins4eval/agent:3186.vc3b_7249b_87eb_-1-nanoserver-ltsc2022'
Build finished successfully

No more duplicated remoting & build number in tags.

Submitter checklist

Preview Give feedback

@dduportal dduportal self-assigned this Oct 30, 2023
Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, and very good work, many thanks!

@dduportal dduportal merged commit 522fed5 into jenkinsci:master Oct 30, 2023
9 checks passed
@lemeurherve lemeurherve deleted the fixcleaner-dup-tags branch October 30, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated remoting & build number in Windows tags
2 participants