Skip to content

Use CIRCLE_SHA1 as the image tag instead of BUILD_NUM which is unreliable#349

Merged
aaron-junot merged 1 commit intomainfrom
irving/tag-commit-sha
Jul 10, 2020
Merged

Use CIRCLE_SHA1 as the image tag instead of BUILD_NUM which is unreliable#349
aaron-junot merged 1 commit intomainfrom
irving/tag-commit-sha

Conversation

@irvingpop
Copy link
Copy Markdown
Collaborator

The problem here: https://app.circleci.com/pipelines/github/OperationCode/resources_api/524/workflows/39d5b471-abef-4067-b6a1-50d021043875/jobs/648

was that using CIRCLE_BUILD_NUM is unreliable because each workflow job will have a new number. This PR proposes using the git commit sha as the tag instead, which is more reliable and traceable back to git!

Signed-off-by: Irving Popovetsky irving@popovetsky.com

…able

Signed-off-by: Irving Popovetsky <irving@honeycomb.io>
@irvingpop irvingpop requested a review from aaron-junot July 10, 2020 05:56
Comment thread .circleci/config.yml
after_build:
- run:
name: Tag and Push with $CIRCLE_BUILD_NUM
name: Tag and Push with $CIRCLE_SHA1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, Ive always thought it was weird that we used the build number instead of the git SHA. I'm good with this change 👍

@aaron-junot aaron-junot merged commit dfa0c5b into main Jul 10, 2020
@aaron-junot aaron-junot deleted the irving/tag-commit-sha branch July 10, 2020 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants