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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ