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.

gefragt vor 4 Jahren927 Aufrufe
4 Antworten
0
Akzeptierte Antwort

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
beantwortet vor 4 Jahren
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
beantwortet vor 4 Jahren
0

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

beantwortet vor 4 Jahren
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!

beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen