GITHUB+JENKINS+DOCKER INTEGRATION

GITHUB+JENKINS+DOCKER INTEGRATION

Task Description:

JOB#1

If Developer push to dev1 branch then Jenkins will fetch from dev and deploy on the dev-docker environment.

JOB#2

If Developer push to master branch then Jenkins will fetch from master and deploy on the master-docker environment. As they both dev-docker and master-docker environments are on different docker containers.

JOB#3

Manually the QA team will check (test) for the website running in the dev-docker environment. If it is running fine then Jenkins will merge the dev branch to master branch and trigger #job 2.

Pre-requisite :

  1. OS: Base OS is Windows 10. Server OS is RedHat Enterprise Linux 8 (RHEL8) in Virtual Box.
  2. In RHEL8 Docker is needed(also need the httpd image downloaded in it), Jenkins (also GitHub plugin should be installed in it).
docker pull httpd

Step 1: Creating Job-1 to fetch code from dev branch and deploy on tester_server.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

When the developer will push the code then this job will will fetch from dev branch and deploy on tester_server.

No alt text provided for this image

Step 2: Creating job 2 to fetch from main branch and deploy on production_server .

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

When the developer will push the code then this job will will fetch from main branch and deploy on production_server.

No alt text provided for this image

Step 3: Creating a QA job which will merge the dev and main branch and trigger job 2.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Console output of merging of dev and main branch.

No alt text provided for this image

After completion of above tasks these are the outputs:

  1. Final webpages
No alt text provided for this image
No alt text provided for this image

2. Containers running on RHEL8

No alt text provided for this image






To view or add a comment, sign in

Others also viewed

Explore content categories