Cannot get build to trigger on PR or master

0

I'd really like my build to automatically fire anytime someone posts a PR or pushes to master. For whatever reason it never works. I'm using GitHub webhooks and have a Primary source webhook event configured for PUSH and HEAD_REF = (master|pr.*) which seems like the correct RegEx, but it doesn't work. If I do master it works for master, if I do pr it works for PR's... what am I missing.

Thanks in advance.

已提问 4 年前927 查看次数
4 回答
0
已接受的回答

Hi StealthSid2,

For your use case, you can use two filter groups:

First filter group:
Event type: PUSH
HEAD_REF: master

Second filter group:
Event type: PULL_REQUEST_CREATED
BASE_REF: master

Best,
Zhen

AWS
Zhen Li
已回答 4 年前
0

Hi StealthSid2, for webhook event filtering, please use the EVENT filter (like the setting in Zhen's response). HEAD_REF and BASE_REF are used to filter the branches of a PR or Push event.

For more details, please check the sample in our documentation https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-pull-request.html#sample-github-pull-request-filter-webhook-events

Thank you for using AWS CodeBuild.

AWS
已回答 4 年前
0

Sorry for the late reply... I don't get notifications from the forum. Let me try this and then mark the appropriate answer.

已回答 4 年前
0

I cannot believe I didn't notice the abilty to add multiple filter groups. I was trying to shoehorn it into a single regex on one filter group. Thanks so much for the help!

已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则