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
- first go to git hub ,create a repository and webhook , webhook trigger when Devloper commit some new Features code.
- 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.
- 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
- 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:
- job1 : For Testing Environment
- 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
- job2 : For Production Environment
- 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
- job3 : For Quality Assurance Team
- 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
Thankyou
If anyone try this setup ping me if any issue occur I will help you .
Software engineer
4 年Great ??