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

feat(build): add new sha ghrc docker tags using docker/metadata-action #3121

Merged
merged 18 commits into from Feb 25, 2023

Conversation

nitrocode
Copy link
Member

@nitrocode nitrocode commented Feb 10, 2023

what

  • use docker meta for tags
  • add sha specific dev tags
  • account for latest tag
  • finish testing (see below)
  • enable build + push on pr on a condition
    • run condition:
      • currently we only build when atlantis-image workflow is modified by a pr
      • should we always run atlantis-image but only build when necessary?
        • ideal
    • build condition:
      • at the moment, we always build when the run condition is met
      • we could build only when there is a pr label present
    • push condition:
      • specific github pr label? - push-image-from-pr
      • always? if we're building anyway, why not just push a specific pr tag up?
      • slash command from maintainer?
      • why build and NOT push ?
        • Maybe only to verify changes to atlantis-image.yml continue to work.
    • push repo:
      • doesn't allow non-admins to push to runatlantis/atlantis ghcr
      • testing if it will push to fork
  • logic to show "Build" or "Build and push"
  • update moby build to latest again
  • Separate PR to show version, commit, and date in version

why

  • combine the dev and release builds into a single step (less maintenance, faster builds when merging to default branch)
  • backwards compatibility of tags (all the same tags as now)
  • added an additional tag so users can test out a specific sha. This will help when trying to test specific changes.
  • added an additional tag so users can test out prs from images before merging code.
    • This does not push at the moment from a PR
  • Now "Build and push" will actually reflect that it will do both. Currently, it will always say that even though pushing is only allowed on pr merge. This bubbles up the push toggle clearly in the build step without having to wait for the whole build to finish to see if it pushed or not... technically if you can catch the build early enough, you can see the initial command which shows --push, but if you miss it, gh ui will not let you go backwards until the build is finished UNLESS you hit the API directly.
  • moby buildkit has resolved the upstream issue where pushes would intermittently fail so we can now use the latest version again

tests

creating a PR to my fork w/o changes to atlantis-image.yml
  • I have tested my changes by creating a PR to my fork

    No atlantis-image build since it will only trigger upon atlantis-image changes

creating a PR to my fork w/ changes to atlantis-image.yml
merging a PR to my fork
adding a new file to my fork
  • I have tested my changes by adding a new file to my fork

    my proposal results

    atlantis:dev
    atlantis:dev-alpine
    + atlantis:dev-alpine-45cc678
    atlantis:dev-debian
    + atlantis:dev-debian-45cc678
creating a pre-release in my fork
creating a release in my fork
creating a workflow dispatch in my fork

references

@nitrocode nitrocode marked this pull request as ready for review February 11, 2023 00:06
@nitrocode nitrocode requested a review from a team as a code owner February 11, 2023 00:06
@nitrocode nitrocode marked this pull request as draft February 11, 2023 00:08
@nitrocode nitrocode marked this pull request as ready for review February 25, 2023 15:32
@nitrocode nitrocode changed the title feat(build): use docker meta for tags feat(build): add new sha ghrc docker tags using docker/metadata-action Feb 25, 2023
@nitrocode nitrocode added this to the v0.23.0 milestone Feb 25, 2023
@nitrocode nitrocode merged commit 4bd0f70 into main Feb 25, 2023
@nitrocode nitrocode deleted the use-docker-meta-for-tags branch February 25, 2023 18:02
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
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.

Combine atlantis-image docker build push actions
2 participants