Pipeline Workflow - CI/CD Pipeline for AWS CloudFormation Templates on AWS Using TaskCat

Pipeline Workflow

As implemented by this Quick Start, the deployment of the CI/CD pipeline for AWS CloudFormation templates requires two branches in the GitHub repository: a source branch and a release branch. (See the Prerequisites section later in this guide for information about setting up your repository.) The source branch is actively used for development and needs to be tested for any code changes. The release branch contains the stable code that has been tested successfully and is ready to deploy.

The CI/CD pipeline consists of three stages:

  • Source stage. When a commit is made into the source branch, it triggers the CI/CD pipeline. In the source stage of the pipeline, the entire contents of the GitHub repository are pulled, zipped, and stored in an S3 bucket. The successful completion of the source stage triggers the build/test stage.

  • Build/test stage. CodeBuild creates a Linux container, installs TaskCat and its dependencies in the container, downloads the zipped file that contains the source code from the S3 bucket, unpacks it, and runs tests using TaskCat. When the tests are completed, the report generated by TaskCat is uploaded to the S3 bucket. If the tests are successful, the deploy stage is triggered. Otherwise, the build is marked as failed.

  • Deploy stage. CodePipeline runs a Lambda function that merges the source branch of the GitHub repository into the release branch. The code is now ready to deploy from the GitHub repository. You can also use AWS CodeDeploy and add your own scripts to deploy your software.