Day 51: Your CI/CD pipeline on AWS - Part 2 ๐Ÿš€ โ˜

Day 51: Your CI/CD pipeline on AWS - Part 2 ๐Ÿš€ โ˜

ยท

2 min read

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

Next few days you'll learn these tools/services:

  • CodeBuild

  • CodeDeploy

  • CodePipeline

  • S3

What is CodeBuild ?

  • AWS CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. CodeBuild eliminates the need to provision, manage, and scale your own build server

  • Task-01 :

  • Read about Buildspec file for Codebuild.

  • create a simple index.html file in CodeCommit Repository

  • you have to build the index.html using nginx server

Task-02 :

  • Add buildspec.yaml file to CodeCommit Repository and complete the build process.

Happy Learning :)

Go to CodeBuild:

Terms you should know about:

  • version: 0.2 specifies the version of the Buildspec syntax we're using.

  • phases contains the build phases for our project.

  • install: Installs nginx on the build environment using the apt-get package manager.

  • build: Copies the index.html file to the default web root directory for nginx.

  • post_build: Performs any additional configuration for nginx, if necessary.

  • artifacts: Specifies the location of the index.html file to be included in the build artifact.

Save the file and commit the changes to the repository using the git add and git commit commands.

Push Buildspec.yml file to main repo:

Create code Build now:

In source section, select source provider AWS CodeCommit, select Repository that you created earlier and select branch main.

Click on build project:

Edit Artifacts i.e.output can be saved in same.

Create S3 bucket and provide the name in Artifact like below.

Once above steps done,start the Build and monitor the logs.

Here is the Output..!!!

Thank you for reading!! Hope you find this helpful.

#day51challenge#90daysofdevops

Always open for suggestions..!!

Thankyou Shubham Londhe !!

ย