This repository contains the source code and configuration for setting up a CI/CD pipeline for a web application using Jenkins and Git.
The web application is a Flask application that includes two templates:
index.html: Contains a form to enter a name.greet.html: Displays a greeting message with the entered name.
- GitHub Repository: Create a GitHub repository for the web application.
- Jenkins Server: Set up a Jenkins server and connect it to the GitHub repository using Webhook.
- Configure Jenkins Pipeline: The Jenkins pipeline is added to do the deployment on every push to repo
- Test Environment: AWS EC2 server is used as test environment, where the application gets deployed for testing.
- Git Checkout: Checkout the code from the GitHub repository.
- Build: Build the application by installing dependencies listed in
requirements.txt. - Unit Test: Run unit tests for the application.
- Deploy to Test Environment: Deploy the application to the test environment.
- Push changes to the GitHub repository.
- Jenkins will automatically trigger the pipeline.
- Monitor the pipeline status in Jenkins.
- Access the deployed application in the test environment to verify functionality.
Jenkins URL http://3.14.82.119:8080/
Application URL http://3.14.82.119:5000/