Reputation: 1344
I am using a webhook to build my project on push requests. By default, AWS CodeBuild builds on push to every branch, however I would like to limit that to master - to trigger the build ONLY when push to master is made. How do I use the regex patterns to do that?
The AWS documentation is not really specific in terms of how to use the regular expressions there.
Upvotes: 11
Views: 7064
Reputation: 888
Set the HEAD_REF
setting to ^refs/heads/master$
. They don't explicitly specify it for master branch in the docs but they do show the equivalent for 'branch1'
Upvotes: 19
Reputation: 2545
You can set the filter group on the webhook, as explained in the documentation @ https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-pull-request.html#sample-github-pull-request-filter-webhook-events-console
Upvotes: 2