Automatic Deployments: Create a CodePipeline
We'll cover the following...
We'll cover the following...
Objective
- Automatically update our application when a change gets pushed to GitHub.
Steps
- Create a CodePipeline.
Defining our pipeline
The pipeline comes in three stages:
- The Source stage pulls the latest code from GitHub.
- The Build stage builds the latest code with CodeBuild according to our
buildspec.ymlfile. - The Deploy stage deploys the build artifacts from CodeBuild to the EC2 instances referenced in the deployment group, and starts the application according to our
appspec.ymlfile.
Line #25: We don’t need to poll for changes because we’ll set up a webhook to trigger a deployment as soon as GitHub receives a change.
Now, let’s create the webhook that will ...