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

[CI-only] Build and publish dev dockerhub images #13084

Merged
merged 4 commits into from
May 17, 2022
Merged

Conversation

mdeggies
Copy link
Member

@mdeggies mdeggies commented May 13, 2022

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

@github-actions github-actions bot added the theme/contributing Additions and enhancements to community contributing materials label May 13, 2022
@mdeggies mdeggies requested review from a team, kpenfound and alvin-huang and removed request for a team May 13, 2022 18:25
@mdeggies mdeggies added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-metrics-test labels May 13, 2022
Comment on lines 255 to 256
hashicorppreview/${{ env.repo }}:${{ env.version }}-dev
docker.io/hashicorppreview/${{ env.repo }}:${{ env.version }}-${{ github.sha }}
Copy link
Contributor

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.

Suggested change
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}}

Copy link
Contributor

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

Copy link
Collaborator

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

Copy link
Contributor

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 :/

Copy link
Member Author

@mdeggies mdeggies May 16, 2022

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.

@hashicorp-ci
Copy link
Contributor

After merging, confirm that you see linked PRs AND check that them for CI errors.

@hashicorp-ci
Copy link
Contributor

After merging, confirm that you see linked PRs AND check that them for CI errors.

@hashicorp-ci
Copy link
Contributor

After merging, confirm that you see linked PRs AND check that them for CI errors.

1 similar comment
@hashicorp-ci
Copy link
Contributor

After merging, confirm that you see linked PRs AND check that them for CI errors.

@hashicorp-ci
Copy link
Contributor

After merging, confirm that you see linked PRs AND check that them for CI errors.

mdeggies added a commit that referenced this pull request May 31, 2022
*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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-changelog PR does not need a corresponding .changelog entry pr/no-metrics-test theme/contributing Additions and enhancements to community contributing materials
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants