Day 53: Your CI/CD pipeline on AWS- Part 4

Radheya Zunjur
4 min readAug 28, 2023

--

On your journey of making a CI/CD pipeline on AWS with these tools, you completed AWS CodeCommit, CodeBuild & CodeDeploy.

Now, let’s finish off in style with AWS CodePipeline

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.

AWS CodePipeline is a continuous integration and continuous delivery (CI/CD) service provided by Amazon Web Services (AWS). It helps you automate and streamline the process of building, testing, and deploying your applications and software updates. CodePipeline facilitates the efficient and reliable release of code changes by orchestrating the different stages of your software delivery workflow.

Here’s how CodePipeline works:

  1. Source Stage: The pipeline begins with the source stage, where you define a source code repository (such as AWS CodeCommit, GitHub, or Amazon S3) that contains your application code. Whenever changes are pushed to this repository, CodePipeline detects them and triggers the pipeline to start.
  2. Build Stage: In the build stage, you can integrate with build tools like AWS CodeBuild to compile, test, and package your code. This stage is where you generate executable artifacts from your source code.
  3. Test Stage: The next stage involves running automated tests on the generated artifacts to ensure the quality and functionality of your application. You can use various testing frameworks and tools here.
  4. Deploy Stages: Once your code has passed the tests, CodePipeline facilitates deployment to different environments (such as development, testing, and production). You can use a range of AWS services, like AWS Elastic Beanstalk, Amazon ECS, AWS Lambda, and more, to deploy your application.
  5. Approval Stage: Optionally, you can add an approval stage before deploying to production. This allows for manual review and approval before releasing changes to the production environment.
  6. Deploy to Production: After approval (if required), the pipeline deploys the approved changes to the production environment.

Throughout these stages, CodePipeline provides visibility into the status of each phase, as well as detailed logs and notifications about the progress and outcome of each step. It helps teams collaborate effectively, ensures consistent and automated processes, and reduces the risk of human errors in the deployment process.

CodePipeline can be integrated with other AWS services and third-party tools to create more complex and customized workflows. It also supports versioning of pipeline definitions, enabling you to manage and track changes to your CI/CD process over time.

Tasks

Task 1 )Create a Deployment group of Ec2 Instance.

In the AWS Management Console > Navigate to CodePipeline > Click on pipelines > Create Pipeline

Click on Create pipeline

Step 1: Choose pipeline settings

Pipeline name: day53-app > Select New Service Role > Click on Next

Step 2: Add source stage

Source Provider: AWS CodeCommit > Repository name & Branch Name: Select your repository & branch > Change detection options: AWS CodePipeline > Click on Next

Step 3: Add build stage

Build provider: AWS CodeBuild > Project Name: Select your Build Project > Click on Next

Step 4: Add the deploy stage

Deploy provider: AWS CodeDeploy > Application name & Deployment group : Select your respective choices > Click on Next

Click on Create Pipeline.

Our pipeline is successfully run. To verify this reach our NginX server via our EC2 instance’s Public IPv4

--

--

Radheya Zunjur
Radheya Zunjur

Written by Radheya Zunjur

Database Engineer At Harbinger | DevOps | Cloud Ops | Technical Writer

No responses yet