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.

preguntada hace 4 años927 visualizaciones
4 Respuestas
0
Respuesta aceptada

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
respondido hace 4 años
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
respondido hace 4 años
0

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

respondido hace 4 años
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!

respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas