Automated launching Apache Web-server using Jenkins …

Here r the statements to do automation….
1. If Developer push to dev branch then Jenkins will fetch from dev and deploy on dev-docker environment.
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.
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
Lets go step by step …
Step 1: Developer push to dev1 branch ..

Now to pull files from dev branch , In Jenkins job1 : give ur github details to Source Code Management …

If developer modify anything in the code , jenkins automatically triggered itself by giving like this …

Now the code has to be deployed in one OS for checking purpose … So I launched Docker Container by writing code in jenkins Execute shell…

Step 2: Second Job in Jenkins: → web-test: Testing the website
Triggering the job after developer-work

Code for testing the webpage .. Note: This code works only for php page …

Step 3: Third Job in Jenkins: → Merge-block: If developer code is working fine , then this job merges dev branch to master branch
Giving the credebtails to the git, and Branch specifier should be dev/

triggering the job after Job2:web-test

In post-build step , create Git publisher and do things as shown below ..

Step 4: Fourth Job in Jenkins: → Finally deploy the webpages for client in production system / OS .. For this we have to launch new Docker container ..

Finally , Done with task …
Build pipeline for this task ….

Thanks for reading …
If any queries regarding task , contact me … Connect on Linkedin ….