• The industry is moving towards automating everything. This article in about integrating our GitHub repository with Jenkins and using containers ( Docker) to deploy web pages ( Using httpd image)
  • We have to create a master branch and a developer branch in a new repository in GitHub.
  • Then we have to create 3 jobs in Jenkins:

JOB 1:

If Developer pushes to developer branch then Jenkins will fetch from developer branch and deploy the website on the developer-docker environment ( Testing environment)

JOB 2:

If Developer pushes to master branch then Jenkins will fetch from the master branch and deploy on the master-docker environment ( Production environment) and use ngrok ( tunnel ) to connect to the world.

JOB 3:

This is the job managed by the Quality Assurance team. If the site is correct and meets the requirements, this job would be executed. It will go to GitHub, merge the developer branch with the master branch, and trigger JOB 2.

PREREQUISITES:

  • Linux
  • Git Bash
  • GitHub
  • Docker — CE
  • Jenkins
  • Browser

STEPS:

  1. A repository is created locally with 2 branches- **Master **and **Developer **and the website content has been added.

  2. Jenkins has been installed in our Redhat8 system. We have to start its service.

Image for post

#jenkins #github #docker #devops #linux

Task 1- GitHub, Jenkins, and Docker Integration
2.15 GEEK