Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can AWS CodePipeline track multiple feature branches and run tests on each?

With Bitbucket and Bamboo, I was able to have Bamboo track every feature branch and run tests on each so that, at the pull request time, I was able to see if the branch passed its unit tests.

With AWS CodePipeline, I can't tell if I am able to track each feature branch and have tests run on them before merging.

Is this possible? If so, please point me to documentation.

like image 550
ignorance Avatar asked Oct 11 '17 19:10

ignorance


People also ask

How can you automate AWS CodePipeline execution?

Your pipeline runs automatically only when something changes in the source repository and branch that you have defined. Manually: You can use the console or the AWS CLI to start a pipeline manually. For information, see Start a pipeline manually. On a schedule: You can set up a schedule that starts your pipeline.

What is the difference between AWS CodePipeline and CodeDeploy?

CodePipeline builds, tests, and deploys your code every time there is a code change, based on the release process models you define. AWS CodeDeploy belongs to "Deployment as a Service" category of the tech stack, while AWS CodePipeline can be primarily classified under "Continuous Deployment".

What are the benefit's of using CodePipeline for continuous delivery?

With CodePipeline, you can quickly iterate on feedback and get new features to your users faster. Automating your build, test, and release process allows you to quickly and easily test each code change and catch bugs while they are small and simple to fix.

How do I change my branch on CodePipeline?

Hi, you can use the AWS lambda to update the branch details in the pipeline, the webhook will have the necessary branch details , you can use python boto3 library in AWS Lambda to update the branch details in the pipeline automatically whenever a new branch is created.


1 Answers

I was looking for a solution to exactly this problem. Eventually I settled on having a CodeBuild, which can be triggered off of a branch regex, begin the pipeline by pushing an archive to a specific S3 key. In my case, I also had that CodeBuild do my full build/test process, but you could also configure the CodeBuild to only pull the code and push it the the S3 key that triggers your CodePipeline.

Here's part of an example CodeBuild config matching 2 branches: Example showing a <code>Branch filter</code> matching 2 branches

Then I set the CodeBuild artifact to go to a single key in a single bucket.

Then I setup a CodePipeline with an Amazon S3 source pointing to the same key/bucket.

like image 193
Brandon Avatar answered Sep 28 '22 22:09

Brandon