Merging Github branch using Jenkins

TASK OVERVIEW

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

JOB-2 : If Developer push to master branch then Jenkins will fetch from master and deploy on master-docker environment. (both dev-docker and master-docker environment are on different docker containers)

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

Step 1: Creating Job-1 to fetch code from dev and deploy on dev-docker environment.

When the developer will push the code then this job will will fetch from dev and deploy on dev-docker environment.

Step 2: Creating job 2 to fetch from master and deploy on master-docker environment.

Console Output of job 2(job_prod)

Step 3: Creating a job which will merge the dev branch to master branch and trigger #JOB-2(job_prod).

Console Output of job 3(job_merge)

The final output are:

This is the final webpage.

--

--

--

I'm passionate learner diving into the concepts of computing 💻

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Get ready for the Beta Testing!

My Current Tech Stack 10.04.2020

Describe one thing you’re learning in class today.

Dart for Flutter : Mixins in dart

Web development, a journey of discovery driven by curiosity

Top Web Development Companies & Web Developers 2018 | Top Web Development Firms

WWDC21 in 5 minutes

Replace rust with rust-bin on Gentoo

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aditya Raj

Aditya Raj

I'm passionate learner diving into the concepts of computing 💻

More from Medium

Solving Jenkins “stderr=Host key verification failed” problem when all else fails

Deployment flow (Github -> Jenkins -> Remote -> AWS ECR)

How I can make ssh from server to Jenkins

Deploy WordPress on Docker

Getting Started with Docker Swarm