-
Notifications
You must be signed in to change notification settings - Fork 116
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
Push a git tag after a VERSION change #1209
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# This gets run as a post-commit hook after merge to add the version tag so it | ||
# is easy to determine what changes are in a particular build. | ||
# | ||
# https://expeditor.chef.io/docs/reference/action-filters/#post-commit | ||
|
||
|
||
VERSION=`cat VERSION` | ||
|
||
git tag $VERSION | ||
git push origin $VERSION |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 order in the config is the order the commands will be executed in, correct? I tried to confirm that in https://expeditor.chef.io/docs/getting-started/action-sets/ but I didn't see it.
If my understanding is correct, looks like BTM got this updated to run before the release.
However, the
bash
action is pre-commit by default (https://expeditor.chef.io/docs/reference/actions/#bash) so I think we needpost_commit: true
added backThere 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 think I actually had it here originally, but with the
post-commit: true
and expeditor had errored saying that the actions had to be listed in the order they would be executed, which had caused me to move it to the end.It seems unlikely that the
trigger_pipeline:omnibus/release
action would be firing before a commit was finished, but it doesn't have a post-commit property on it.I'm starting to get confused about what commit we're actually referring to.
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.
It should be before
trigger_pipeline
, and specified with apost_commit: true
. I'll see if I can find out why it was giving you an error.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 put your exact scenario into my spec tests and everything came up golden. Let's try your config with the following
merge_actions
: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.
As for "what commit we're actually referring to", there is an implicit commit between the pre-commit and post-commit phases. That's likely what we're referring to.
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 probably had it between
bash:.expeditor/determine_version.sh:
andbuilt_in:update_changelog:
before.