Integration of Github with Docker and Jenkins
The aim of the this article is to configure a web server inside the container with the right HTML code.
Task description
Job1 : If Developer push to dev branch then Jenkins will fetch from dev and deploy on dev-docker environment.
Job2: If Developer push to master branch then Jenkins will fetch from master and deploy on master-docke environment. both dev-docker and master-docker environment are on different docker containers.
Job3: QA team will check (test) for the website running in dev-docker environment. If it is running fine then Jenkins will merge the dev branch to master branch and trigger #job 2
Project Description
I created a local repository where I put my code. This Repository is also Known as Work-Space . And push my HTML code in Git Hub, and created one more branch for the developer where the developer team pushes the code.
Job1:
Jenkins fetch from dev and deploy on dev-docker environment
Here you see dev code run successfully it return status code 200.
Job2:
Jenkins fetch from master and deploy on master-docker environment
JOb3:
As in Job 1, it returns Status Code = 200, it means it is working fine.
So now it will merge dev branch to master branch. And push it to Github.