Source code in my organization is managed in a GitHub repository. For now, our CI process uses AWS CodePipeline as follows:
- Webhooks detect code changes in a specific git branch
- The updated branch is then used the input for AWS CodeBuild
- The finished build is deployed onto one of our staging environments using Elastic Beanstalk
- Tests are run on the Elastic Beanstalk environment.
We want to add detection of new pull requests in our git repository. Whenever a new PR is created in our repo, we'd like to automatically trigger a build to an EB environment, through CodePipeline as above.
Our roadblocks:
- Looking at the available settings for GitHub Webhooks in CodePipeline, we cannot find a way to specify that the pipeline's trigger should be a new PR.
- In any case, the GitHub source for a CodePipeline must be a specific branch. We'd like PRs to be detected in any branch.
What would be the best approach here? I've seen some methods being discussed, but most of them appear to be on the cumbersome/high-maintenance side. If there's anything new in the AWS toolchain that makes this easy, it'd be cool to know.
Thanks!