Automated launching Apache Web-server using Jenkins …

Nithish Kumar
3 min readJun 20, 2020

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 ..

Branch : dev1 ….

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 ….

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Nithish Kumar
Nithish Kumar

Written by Nithish Kumar

Aspiring DevOps/Cloud Engineer. #Believe in you.

No responses yet

Write a response