A comprehensive Jenkins CI/CD pipeline implementation with AWS deployment. This project showcases modern DevOps practices including containerization, automated testing, and cloud deployment using Jenkins, Docker, and AWS services.
This project serves as a hands-on learning resource for Jenkins pipeline development, featuring:
- React Frontend: Simple React application with version display
- Jenkins Pipeline: Complete CI/CD pipeline with multiple stages
- Docker Containerization: Multi-stage Docker builds with nginx
- AWS Integration: Deployment to AWS ECS with ECR image registry
- Infrastructure as Code: ECS task definitions and IAM policies
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Developer │───▶│ Jenkins │───▶│ AWS Cloud │
│ Git Push │ │ Pipeline │ │ ECS + ECR │
└─────────────────┘ └──────────────────┘ └─────────────────┘
- Build: Node.js application build using npm
- Docker Image: Create production Docker image with nginx
- Push to ECR: Upload image to AWS Elastic Container Registry
- Deploy to ECS: Update ECS service with new task definition
├── src/ # React application source code
├── aws/ # AWS configuration files
│ ├── iam-policy-s3.json
│ ├── s3-bucket-policy.json
│ └── task-def-template-prod.json
├── ci/ # CI/CD Docker images
│ ├── Dockerfile-aws-cli
│ ├── Dockerfile-playwright
│ └── Jenkinsfile-nightly
├── Dockerfile # Production Docker image
├── Jenkinsfile # Main CI/CD pipeline
└── README.md
- React 18: Modern React with functional components
- Create React App: Development and build tooling
- CSS3: Custom styling with animations
- Jenkins: CI/CD pipeline orchestration
- Docker: Containerization and multi-stage builds
- nginx: Production web server (Alpine Linux)
- AWS ECS: Container orchestration service
- AWS ECR: Docker container registry
- AWS CLI: Infrastructure management
- AWS IAM: Permissions and access management
- Node.js 18: Build environment
- Playwright: End-to-end testing framework
- Docker-in-Docker: Container builds within pipeline
The pipeline uses the following environment variables:
REACT_APP_VERSION: Application version (auto-generated)APP_NAME: Application name for AWS resourcesAWS_DEFAULT_REGION: Target AWS regionAWS_ACCOUNT_ID: AWS account identifierAWS_ECS_CLUSTER: ECS cluster nameAWS_ECS_TASK_DEF: ECS task definition nameAWS_ECS_SERVICE: ECS service name
aws-account-id: AWS Account ID (secret text)aws-local-jenkins: AWS credentials (username/password)
- Parallel Builds: Efficient resource utilization
- Docker Agents: Isolated build environments
- AWS Integration: Seamless cloud deployment
- Automated Versioning: Build-based version numbers
- Service Health Checks: Wait for deployment stability
This project demonstrates:
- Jenkins Pipeline as Code: Declarative pipeline syntax
- Docker Multi-stage Builds: Optimized production images
- AWS Container Services: ECS and ECR integration
- Infrastructure Automation: Parameterized deployments
- DevOps Best Practices: CI/CD implementation patterns
To extend this project, consider:
- Adding automated testing stages
- Implementing blue/green deployments
- Adding monitoring and alerting
- Setting up multiple environment deployments
- Integrating security scanning tools