This experiment focuses on the design and implementation of a complete Continuous Integration and Continuous Deployment (CI/CD) pipeline using Jenkins as the automation server, GitHub as the source code repository, and Docker Hub as the container registry. The pipeline automates the process of building, packaging, and deploying applications in a consistent and reproducible manner.
The objective of this experiment is to:
Developer → Code Commit → Jenkins Pipeline → Docker Build → Docker Hub
A simple Flask application was developed to demonstrate the CI/CD workflow. The application responds with a message confirming successful deployment.
A Dockerfile was created to containerize the Flask application. The image uses a lightweight Python base image and installs required dependencies before exposing the application on port 80.
A Jenkins pipeline was created using declarative syntax. The pipeline consists of the following stages:
Each stage executes specific commands required for automation.
Docker Hub credentials were securely stored in Jenkins using the credentials manager. The credentials were injected into the pipeline during execution to authenticate Docker operations.
The pipeline was executed successfully through Jenkins. Each stage completed without errors, indicating proper configuration and integration between Jenkins and Docker.
The Docker image was successfully built and pushed to Docker Hub. The repository contains the latest image version tagged appropriately.
This experiment successfully demonstrates the implementation of a CI/CD pipeline using Jenkins, Docker, and Docker Hub. The pipeline automates the process of building and deploying applications, ensuring consistency and reliability. The successful execution of all pipeline stages confirms that the system is correctly configured and functioning as intended.