This project implements a complete CI/CD (Continuous Integration/Continuous Deployment) pipeline using Jenkins on AWS. The pipeline is automatically triggered by a Git push, building a Docker application, and pushing the image to Docker Hub. Infrastructure is managed as code using Terraform.
Before you begin, ensure you have the following:
- An AWS account with appropriate permissions.
- A Docker Hub account.
- The following tools installed on your local machine:
The workflow is as follows:
- A developer pushes code to the main GitHub branch.
- GitHub sends a webhook notification to the Jenkins server.
- Jenkins pulls the latest code, including the
Jenkinsfile
. - Jenkins executes the pipeline stages defined in the
Jenkinsfile
. - The pipeline builds a new Docker image and pushes it to Docker Hub.
This repository uses Terraform to provision the Jenkins server on AWS.
Initialize Terraform:
terraform init