CI/CD example to build, push and deploy your application to AWS ECS containers using Jenkins Declarative Pipeline.
This contains our sample nodes application code.
JenkinsFile Containing the Jenkins declarative pipeline that is triggered on each pull request.
DockerFile containing image build information used by Dcoker on the Jenkins 'Building Image' stage to build the image containing the build artifacts.
Used to store the Docker image received from Jenkins as part of the 'Push Image to ECR' stage.
Deploys the application as a container based on the image stored in ECR using the 'Deploy Image to ECR' stage.
Declarative Checkout SCM: Checks out src from repo
Declarative Tool Install:Install build tools (Maven/Node) required as part of the 'Build & Unit Test' stage
Build & Unit Test: Builds src dependencies and performs unit tests
Buidling Image: Builds local Docker image in Jenkins workspace from build artifact
Push Image to ECR: Pushes built image to ECR
Image Cleanup: Removes all local images created by Docker locally
Deploy to Deve: Deploys image to ECS cluster in the Dev environment from the ECR image
Deploy to Teste: Deploys image to ECS cluster in the Test environment from the ECR image
Deploy to Stagee: Deploys image to ECS cluster in the Staging environment from the ECR image
Deploy to Prode: Deploys image to ECS cluster in the Prod environment from the ECR image