This repository contains the necessary configuration and code to deploy a static website on AWS Elastic Beanstalk using Jenkins pipeline.
- Git installed on your local machine.
- An AWS account with access keys and permissions to deploy resources.
- Jenkins Setup:
- Environment variables
- Secrets
- Plugins
- GitHub Setup:
- GitHub repository created
- Webhook configured to your Jenkins server
- Triggering the Pipeline:
- The pipeline will be triggered through your webhook.
- For pull requests, the
Push image in review and deploy it
stage will be executed.
- Pipeline Stages:
Build Image
: The Docker image is built using the provided Dockerfile.Run Container
: A Docker container is spun up based on the built image.Test Container
: The running container is tested using curl.Artifact
: Previous containers are removed to clean up.Push Image to Docker Hub
: The built image is tagged and pushed to Docker Hub.Push Image in Review and Deploy
: This stage is specifically for change requests like pull.Push Image in Staging and Deploy
: This stage push the image in staging environment.Push Image in Production and Deploy
: This stage push the image in production environment.Post
: A notification is sent to Slack indicating if the pipeline succeed or not.