Your CI/CD pipeline on AWS - Part 4

Your CI/CD pipeline on AWS - Part 4

What is CodePipeline ?

CodePipeline builds, tests, and deploys your code every time there is a code change, based on the release process models you define. Think of it as a CI/CD Pipeline service.

Task-01 :

  • Create a Deployment group of Ec2 Instance.

We already created an application and deployment group in the previous day, Day 52.

  • Create a CodePipeline that gets the code from CodeCommit, Builds the code using CodeBuild and deploys it to a Deployment Group.
  1. Access the AWS Management Console and navigate to the CodePipeline service.

    Click on "Create pipeline"

  2. Choose a pipeline name and for Pipeline type, choose v2. Then for Service role, New service role.

  3. Add variables

  4. For source provider, choose AWS CodeCommit. Configure the CodeCommit repository and branch.For Change detection options, choose AWS CodePipeline

  5. Add a build stage. Select AWS CodeBuild as the build provider and put your project name.

  6. Add a deploy stage: Select AWS CodeDeploy as the build provider and put your Application name.

  7. Review all the details you provided and click on "Create pipeline"

  8. Pipeline Execution: The pipeline will source for the code from the CodeCommit repository, build the code,

  9. And deploy the code

  10. You can now navigate to the EC2 public URL to check the webpage

    We've now set up a CodePipeline that automates the process of getting code from CodeCommit, building it using CodeBuild, and deploying it to an EC2 instance deployment group using CodeDeploy.

We will make some changes to our index.html file, push the changes to the CodeCommit repository and observe the pipeline automatically trigger the build.

The pipeline is applying the changes

Reload the browser and confirm that the changes have been applied successfully.

Thank you!