Building a CI/CD Pipeline on AWS with CodeCommit, CodeBuild, CodeDeploy, and CodePipeline: A Step-by-Step Guide
Table of contents
Pre-requisites
AWS account setup6
Basic understanding of Git
Setting up CodeCommit
- Creating a new CodeCommit repository
Write codecommit in the services tab and click you will be taken into the codecommit section. Create a repository which will act as source from where your code will be taken for the pipeline.
Write the name for the repository and description if you want to.
Now open the folder in which you want to create local repo in vs code or any other text editor you want with terminal.
Now paste the copied url in the terminal using
git clone
command to clone the codecommit repo in the local.Now add all the files in the folder you want to push to the remote repo in the codecommit
- Pushing sample code
All the files are not added hence untracked here.
Use the git commands
git add .
, git commit -m " "
and git push
to push all the files to the remote repository in the codecommit.As you can see all the files have been pushed to the codecommit repo.
Start build and check if all the phases are completed sucessfully.
Now if you want to store the content of the build someplace you will need s3 bucket to store the artifact. Go to the S3 and create a bucket there.
After creating a bucket create a folder in it which will store the artifact created by the build.
Now go to the edit tab of the build and go the artifact and fill in the details.Read the descriptions carefully to understand what you need to specify.
ย