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

Resolve BUILDKITE_COMMIT before pipeline upload #871

Merged
merged 1 commit into from
Dec 16, 2018

Conversation

lox
Copy link
Contributor

@lox lox commented Dec 14, 2018

This resolves BUILDKITE_COMMIT (which can be HEAD or FETCH_HEAD) to an actual commit before interpolation into a pipeline that is being uploaded.

Closes #456.

Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

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

Oh my, this removes so much many hacks! 👏🏼

@lox lox requested a review from keithpitt December 14, 2018 07:48
@lox
Copy link
Contributor Author

lox commented Dec 16, 2018

For historical context, this would be better placed at the bootstrap level so that anything in the job gets the resolved value for $BUILDKITE_COMMIT, but our concern was that might be too much of a breaking change. This hacky fix at least prevents people running into the issue and we can re-evaluate when we move to 4.0.0.

@lox lox merged commit bc5b6e1 into master Dec 16, 2018
@lox lox deleted the resolve-buildkite-commit-for-uploads branch December 16, 2018 02:48
@nullobject
Copy link

Ace, thank you. What a lovely xmas present 🎅❤️

@keith
Copy link

keith commented Feb 27, 2020

It seems like this case may still exist if you're using a scheduled job that sets HEAD as the commit? In that case I still see BUILDKITE_COMMIT being set as HEAD

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.

Using BUILDKITE_COMMIT in pipeline.yml files
4 participants