简体   繁体   中英

AWS Codedeploy for different branches

I am using AWS code pipeline, how to configure it for different branches? I have two branches master and dev and need different configurations (appspec.yml) was not able to find any good documentation related to this. Could someone help on this?

I will like to answer this, as I was in the same situation and mindest. Most people compare the Jenkins strategies and try to apply them in the code pipeline. (Keeping the branch variable)

Understanding the two systems. Code Pipeline wasn't designed to handle such complex configurations. There is a way to do it (but the complexity defeats the purpose of doing it). It requires a way complex understanding of the system, which the devs in the initial phase of exploring the service might not have.

Here is the article explaining how you can create a multi-branch strategy. https://aws.amazon.com/blogs/devops/multi-branch-codepipeline-strategy-with-event-driven-architecture/

I understand it now, but when I was just starting, it was a nightmare.

The easiest approach will be to have two separate buildspec.yml with two code build applications and change the appspec.yml dynamically while exporting artefacts in code build. Code deploy will take care of deployment configurations based on appsepc.yml.

If such reconfigurability is an issue for you, I'll recommend exploring Jenkins & other options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM