Fully Automation with Jenkins , github and Docker Container

Fully Automation with Jenkins , github and Docker Container

I am just posting my 6 days learning .. i made a project with fully functional end to end automate by jenkins ...

#devopsassemblyline #linuxworld #jenkinsintegration

Jenkins integration

  1. first go to git hub ,create a repository and webhook , webhook trigger when Devloper commit some new Features code.
  2. go to jenkins create testing_job for testing the web server when developer commit and push some features on git that time testing-job trigger automatic with help of webhooks.
  3. create one more job for QA-team-job QA -team when testing done with no error then testing team passing green single(mail) and trigger production job by remote url that url
  4. create one more job for Production-job after QA-team passing green single then Automatic trigger production job and deploy website for client

follow these steps:

  1. job1 : For Testing Environment
  2. SCM Git then enter the repo URL and branch dev1
sudo cp -rvf * /testsite
if sudo docker ps | grep testing_webserver
then sudo docker rm -f testing_webserver
sudo docker run -dit -p 2021:80 -v /lwweb2:/usr/local/apache2/htdocs/ --name testing_webserver httpd
fi
  1. job2 : For Production Environment
  2. SCM Git then enter the repo URL and branch master
sudo cp -rvf * /deploysite
if sudo docker ps | grep production_webserver 
then echo "Already Running" 
else sudo docker run -dit -p 2020:80 -v /lwweb:/usr/local/apache2/htdocs/ --name prodwebos httpd 
fi
  1. job3 : For Quality Assurance Team
  2. SCM Git then enter the repo URL and branch dev1
#!/bin/bash 
echo "Build Sucessfull"

Post build Actions-
Check - Push only if build Succeeds Merge results
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

Thankyou

 If anyone try this setup ping me if any issue occur I will help you .


要查看或添加评论,请登录

Suraj S.的更多文章

社区洞察

其他会员也浏览了