navigation

Serverless - CI/CD with CodePipeline

Overview

Continuous Integration, Continuous Delivery, Continuous Deployment (CI/CD) are software development practices for producing software in short cycles between merging source code changes and updating applications. The ultimate goal of these practices is to reduce the costs, time, and risks by delivering software in small pieces.

In workshop 7 of this series, we will know about CI/CD flow building so that every time you change and push source code on the git repository, it will automatically re-update our services and applications. There are many tools for us to build CI/CD, the most popular are Jenkins, Gitlab CI, Circle CI. In this workshop, we will use AWS’s CodePipeline.

The CI/CD Architecture for back-end: SeverlessExample

  • The develop create a git repository on CodeCommit and pushes code of SAM project on it
  • Every time the source code is updated, CodeBuild will automaticlly rebild and prepare the CloudFormation template
  • CloudFormation creates/updates serverless services

The CI/CD Architecture for website front-end:

SeverlessExample

  • The developer creates a git repo on CodeCommit and pushes the front-end code on it
  • Every time the source code is updated, CodeBuild will automatically rebuild and then package the build folder
  • Finally, the build folder is pushed to the S3 bucket with the static hosting website enabled

Content

  1. Preparation
  2. Build SAM pipeline
  3. Build pipeline for frontend
  4. Test web operation
  5. Cleanup