Task_1 Automation

Neeteesh Yadav
3 min readJun 22, 2020

--

In this we integrate Git, GitHub, Jenkins and Docker. Use of these toll launch web-server.

Description of Task……….

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

JOB#2
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.

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 dev branch to master branch and trigger #job 2

Given task solve some steps…..

Step1:- Create a workspace and write code upload on the GitHub

step2: Create first job developer branch

In this step we create a job to copy the code on github and run the developer branch code use of docker web-server deploy the code on the web page.

#sudo cp -v -r -f * /root/

use this command copy the code in the github.

#docker ps -a

This command show all the running docker containers.

#grep

This command use to search the containers/file.

#sudo docker run -dit -p 1234:80 -v /prod:/usr/local/htdocs/ — name d_web httpd

  • d : this command use to detach the container
  • it : this command run interactive terminal
  • p : this command give the port
  • v : mount the folder

Step 3:- create job for for master branch

In this step create a job for master branch and run the docker container and deploy the webpage.

ste4:- Create job for merge the dev branch and master branch

In this step create a job to merge all the branch and run the container and deploy the webpage.

Thanks #vimal sir give great idea to integration of the docker and jenkins to run container deploy the web page.

--

--

Neeteesh Yadav
Neeteesh Yadav

Written by Neeteesh Yadav

Technical Enthusiast | MlOps(Machine learning + Operations)| DevOps Assembly Line| Hybrid Multi cloud

No responses yet