-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[CI-only] Build and publish dev dockerhub images #13084
Conversation
.github/workflows/build.yml
Outdated
hashicorppreview/${{ env.repo }}:${{ env.version }}-dev | ||
docker.io/hashicorppreview/${{ env.repo }}:${{ env.version }}-${{ github.sha }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it looks like the convention in the rest of this file is to not use spaces between the brackets.
hashicorppreview/${{ env.repo }}:${{ env.version }}-dev | |
docker.io/hashicorppreview/${{ env.repo }}:${{ env.version }}-${{ github.sha }} | |
hashicorppreview/${{env.repo}}:${{env.version}}-dev | |
docker.io/hashicorppreview/${{env.repo}}:${{env.version}}-${{github.sha}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these tags be different? It looks like one is:
v1.12.0-dev
And the other is
v1.12.0-aabbcc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(the docker.io part is optional)
but the difference between the two tags is one updates <version>-dev
to be the latest commit on that release branch whereas the other one will be pushed per commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I guess it's small but it would be nice if the two URIs are consistent (either both include docker.io
domain or both omit it), but not that big of a deal :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can update that, Evan. Also: the convention is to use spaces between brackets but that isn't reflected in this repo, as consul was one of the first projects to onboard.. I can open a separate PR to address that.
After merging, confirm that you see linked PRs AND check that them for CI errors. |
After merging, confirm that you see linked PRs AND check that them for CI errors. |
After merging, confirm that you see linked PRs AND check that them for CI errors. |
1 similar comment
After merging, confirm that you see linked PRs AND check that them for CI errors. |
After merging, confirm that you see linked PRs AND check that them for CI errors. |
*Background* Pushing per-commit dev images to the `hashicorppreview` dockerhub org was introduced in #13084. On merges to a release branch in the format `release/$MAJOR.$MINOR.x`, artifacts including docker images are built, tagged, and pushed to `hashicorppreview` under the tags `$VERSION` and `$VERSION-$GITCOMMIT`. [Note that `$VERSION` includes the prerelease string as a suffix.] The team has automation that runs to pull down these images and run tests against them. *In this PR* This PR suggests changing the `$VERSION` string (and docker tag) on the active release branches [1.10.x, 1.11.x, 1.12.x] to mirror the release branch naming convention, `$MAJOR.$MINOR.x`. Since the tip of the release branch contains the latest patch code changes, using a `.x` instead of pointing to a specific patch version is what we've adopted for release branch naming, and would like to adopt for dev_tags. The version string is updated prior to building for a release, so this should have no adverse effects. *Examples* `hashicorppreview/consul:1.13.0-dev` will become `hashicorppreview/consul:1.13.x-dev` `hashicorppreview/consul:1.13.0-dev-364758ef2f50519cb12585f7148fdcc8f213f27d` will become `hashicorppreview/consul:1.13.x-dev-364758ef2f50519cb12585f7148fdcc8f213f27d`
Description
This introduces build/publishing of dev dockerhub images to the hashicorppreview dockerhub org. This will be kicked off when a PR is merged to any of the release branches (or main) listed in the
release_branches
array in.release/ci.hcl
.Testing & Reproduction steps
I tested out a publish from this test branch in commit: c29e03a. You can see the images available here: https://hub.docker.com/repository/docker/hashicorppreview/consul/tags?page=1&ordering=last_updated (which I will delete after this PR is merged).
Links
Link to full documentation describing how dev images are created and published, their naming conventions, etc: https://go.hashi.co/dev-docker-images