it is assumed you already know the process about continuous integration CI/CD, each time you make a git push origin your_branch_name it will automatically gets your code from Github or Bitbucket it will build it and unzip it at the S3 desired bucket let it up and ready in an automatic way.
this tutorial woks well up today, it anything has changed then it will give you an idea about how to implement this kind of tool in your development team
let's start creating an S3 bucket where the front willl be
now click on bucket properties and select the Static web hosting option
now click on the bucket permissions - CORS configuration and set
now click on the bucket permissions - Bucket Policy and set
we have the S3 bucket ready to keep on moving, so let's go to the sercvice CodePipeline and click on Create pipeline give it a name to your pipeline project
I selected Bitbucket at the source provider , after I did it and connected the account I selected the repository where I've got the frontend which I want to link with the S3 bucket alongside with the branch name in this case master
I selected AWS CodeBuild at the build provider, I gave it a name, let's click now on Create Project, you'll get a popup maximize it
I selected at environment the next options
Operative system = Amazon Linux 2
Runtimes = Standar
Image = Use the latest image
Click on Continue to CodePipeline
Click on next, and at the Deployment provider select Amazon S3, select the bucket and click on Extract file before deploy and click on next
Click on Create pipeline
so now, the most importan thing, you must add a file called buildspec.yml at your root level folder project
inside that file you must set
so, go to your front project make a change, and run git push origin master
as soon as the git push origin master was done the process started
after a couple of seconds
now go to your s3 bucket and get the url link from the bucket properties - static web hosting
then you will be able to see the front running on that bucket
CI/CD AWS CODEPIPELINE
Comments
Post a Comment