3
votes

We are using GitHub as our source repository, AWS CodeBuild to compile the code from GitHub, Elastic Beanstalk to host environments and CodePipeline to trigger a build on commit and to deploy the code to different environments, with production being the final environment.

What I would like to add as a final step to CodePipeline is a merge back to master after a build has been deployed to production. I did a brief search on google but could not find any good references for how to initiate a git merge.

Does anybody have any experience with triggering a merge from CodePipeline?

1
What about using an additional lambda or codebuild step where you script the merge?Paulo Schreiner

1 Answers

1
votes

Currently there isn't built-in support for merging.

Today most users run their pipeline on master, and merge into that before the code enters their pipeline. One advantage of this approach is that it ensures your pipeline is run on the exact merged version on mainline, rather than a pre-merge version.

However, we're aware that some workflows like a pull-request based workflow would benefit from being able to merge at the end of a pipeline.

The best workaround today is to use a Lambda function, custom action, or CodeBuild step to perform the merge.