BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News AWS CodePipeline Embraces Monorepos, GitFlow and Branches

AWS CodePipeline Embraces Monorepos, GitFlow and Branches

This item in japanese

AWS has announced new features in CodePipeline, their managed continuous delivery service facilitating automated release pipelines for application and infrastructure updates. These additions aim to support teams employing various delivery strategies, providing customers with more flexibility in their pipeline designs. In this update, CodePipeline introduces triggers and new execution modes, catering to the needs of users using branch-based development or managing multiple projects within a monorepo.

In a post with some comprehensive and thorough examples, Michael Ohde from AWS details how to leverage the new functionality to create three distinct pipeline designs. The process of setting up these pipelines involves configuring triggers and execution modes within the AWS Management Console or through scripting with the CodePipeline API. Users can choose from execution modes such as Queued, Parallel, or Superseded, depending on their requirements for handling multiple executions.

GitFlow Release Pipeline

The GitFlow release pipeline, for instance, uses the Queued execution mode to process executions in the order they are triggered. By configuring branch filters, users can specify branches like main, develop, hotfix, and release, ensuring the pipeline responds to relevant code changes pushed to any of the configured branches. This design allows teams to follow the GitFlow development model, which is frequently used to manage large projects with parallel development and releases using long-running branches.

Configuring a GitFlow release pipeline for AWS CodePipeline

Pull Request (PR) Pipeline

Similarly, the PR pipeline, utilizing the Parallel execution mode, triggers executions independently for each pull request. This setup enables swift validation of proposed changes across branches before merging. This is designed to run on all pull requests and is noted for being particularly useful for catching build and test failures before merging changes into the main branch.

Configuring an example PR pipeline in AWS CodePipeline

Monorepo Pipeline

For the monorepo pipeline, users can focus pipeline executions on specific folders within the repository by configuring file path filters. This approach minimizes unnecessary executions and optimizes resource allocation. This is ideal for setups where a single repository contains code for multiple projects.

Configuring multiple paths in a monorepo in AWS CodePipeline

Reaction to these changes has been positive, though some commentators suggest that the changes are overdue.

Almost 9 years after its initial release, CodePipeline finally supports branch-based repos. I could have really used this in 2018

Luc van Donkersgoed

Introducing triggers and execution modes in AWS CodePipeline opens a wider range of possibilities for users and teams to automate their delivery workflows, especially when their development practices don't fit well into the smaller number of use cases previously catered for. Teams using GitFlow or with custom, potentially complex multi-branch strategies can now use AWS CodePipeline more effectively.

For further guidance on utilizing these features, users can refer to the AWS CodePipeline User Guide and explore hands-on tutorials provided by AWS.

About the Author

Rate this Article

Adoption
Style

BT