CodePipeline v2 - trigger on a PR AND a specific branch name only

0

I'm working on a CodePipeline v2, and I'm doing a lot of testing. I'd like to be able to limit the triggering to happen only on PRs and a single specific branch only (the one I am developing against).

The trouble is that it seems like the branchesIncludes option is for target branch, not source branch.

If I set it to anything other than **, then all triggers, including my branch stop working.

profile picture
asked 8 months ago331 views
1 Answer
1

Have you looked into using a webhook for 3rd party sources assuming you’re using something like GitHub?

https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-about-starting.html

It does say the source branch is used when using filters

Pull request A pull request trigger starts a pipeline when a pull request is opened, updated, or closed in your source repository. The execution will use the commit from the source branch that you're pulling from (that is, the source branch). You can filter pull request triggers on branches and file paths.

https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-filter.html

profile picture
EXPERT
answered 8 months ago
  • Yes, I’m using the CodeConnection Connection which uses webhooks. But for some reason I can’t get it to only watch my branch. What are the exact settings should I use to limit to one branch only?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions