AWS Code Build - CI/CD Series Part 2

 

AWS CodeBuild is a fully managed build service that compiles source code, runs tests, and produces software packages that are ready to deploy. With CodeBuild, you don’t need to worry about provisioning and managing your own build infrastructure. 

CodeBuild integrates with other AWS services like CodePipeline, so you can easily automate your entire software release process.

Buildspec file:

The Buildspec file is a configuration file used by AWS CodeBuild to define how to build and deploy your application or software project. It is written in YAML or JSON format and contains a series of build commands, environment variables, settings, and artifacts that CodeBuild will use during the build process.

Let's start with building a project in CodeBuild.


Next, I need to select the source. The source is where my code exists. I am selecting "Code Commit" as my source.


When selecting "Code Commit" I have to mention the repository name and the branch name (main).


Next, We select the environment for building the code. This build process will happen at the backend on a compute (EC2) and I am saying to use Ubuntu OS.

Next, We create a role. 


Next, We instruct the build process to use "buildspec.yml" file.


Next is the Artifacts, This instruct the build output to be save in a S3 bucket in zip format.



We are done. Lets start the build and see the status.



Build is completed successfully and it should save the build file in zip under S3 bucket.


We can see the build file.

In the next post, We will see  CodeDeploy.













Comments

Popular posts from this blog

SRE/DevOps Syllabus

AWS Code Commit - CI/CD Series Part 1

Docker - Preventing IP overlapping