Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CodeBuild Branch filter option removed

We are using AWS CodeBuild Branch filter option to trigger a build only when a PUSH to Master is made. However, The 'Branch filter' option has been apparently removed recently and 'Webhook event filter group' are added. They should provide more functionality I expect, but I cannot see how to make the 'Branch filter'.

Can someone help?

like image 442
Stanislav Ivanov Avatar asked Feb 11 '19 10:02

Stanislav Ivanov


People also ask

What version of AWS CLI does CodeBuild use?

codebuild — AWS CLI 1.27. 3 Command Reference.

What is Codebuild_src_dir?

CODEBUILD_SRC_DIR. The directory path that CodeBuild uses for the build (for example, /tmp/src123456789/src ). For secondary sources, the environment variable for the secondary source directory path is CODEBUILD_SRC_DIR_ <sourceIdentifier> , where <sourceIdentifier> is the source identifier you create.

What is Head_ref in git?

A HEAD_REF filter evaluates the Git reference name for the branch or tag. The branch or tag name appears in the name field of the new object in the push object of the webhook payload. For pull request events, the branch name appears in the name field in the branch object of the source object in the webhook payload.


1 Answers

I couldn't see this change flagged anywhere, but it worked for me setting Event Type as PUSH and HEAD_REF to be

refs/heads/branch-name

as per

https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-pull-request.html

like image 92
Joe Pietroni Avatar answered Sep 22 '22 18:09

Joe Pietroni