2

I have a pull request open in my github repo that I have been pushing to. Normally, a push will trigger a new build in CodeBuild, with this variable set to the branch name ( pr/10 )

$CODEBUILD_SOURCE_VERSION

As of Oct 29th 2018, this variable now is always the commit SHA, which is breaking our build script. I think AWS might have deployed a bug?

Has anyone else experienced this?

2 Answers 2

4

Thank you for using AWS CodeBuild. For builds triggered by GitHub pull request event via webhook, we changed the input source version from "pr/#" to the head commit SHA. You can find the pull request number ("pr/#") in $CODEBUILD_WEBHOOK_TRIGGER environment variable.

The $CODEBUILD_WEBHOOK_TRIGGER environment variable shows what triggers the webhook build, e.g. "pr/#", "branch/{branchName}", "tag/{tagName}".

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the timely reply. Is there a way I can be notified for future breaking changes to the service? A changelog perhaps
2

I wanted to clarify that this was an unintended change in behavior for the CODEBUILD_SOURCE_VERSION environment variable. We are rolling out a fix to return to the original behavior. We estimate this fix to be completely deployed in the next couple of days.

Thank you for promptly bringing it to our attention.

2 Comments

I already changed my code to use the new $CODEBUILD_WEBHOOK_TRIGGER variable, will I have to revert those changes? Is there a way I can subscribe to breaking changes in the future?
The newly added CODEBUILD_WEBHOOK_TRIGGER will remain and would be the recommended way to get the details on what triggered the webhook. Restoring the original behavior for CODEBUILD_SOURCE_VERSION, so that customers who may have relied on that environment variable, as part of their build aren't left in a broken state. Hope that clarifies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.