Download Git
Install Git
Download Java
Install Java
Configure Java
Install Jenkins (2nd approach war file)
Download Tomcat S/w
INstall Tomcat
Jenkins Homefolder
Restart the computer
Jenkins.war file in tomcat container
Access jenkins web platform
Download Ant : https://ant.apache.org/bindownload.cgi
Configure Ant
Extract the binary file
Setup environment variable
Restart computer
Step 1: The developer clone already existed project from github to Local PC
Step 2: After making necessary modifications, developer push the code back to github
Step 3: In Jenkins, install the plugin Githud and Then create a project
Use Custom Workspace location = $(JENKINS_HOME)/workspace/samplewebapp
Source code management: Git
Save
Step 4: Install Ant plugin via Jenkins "Ant"
Step 5: CReate second job Same location and Git repo
Use Custom Workspace location = $(JENKINS_HOME)/workspace/samplewebapp
Source code management: Git
Build Steps > Invite ANT > Target: checkstyle > Apply > Save
Step 6: Install junit Jenkins plugin (junit realtime)
Step 7: Create Third Job
Use Custom Workspace location = $(JENKINS_HOME)/workspace/samplewebapp
Source code management: Git
Build Steps > Invite ANT > Target: junit > Add post build ation : public Junit test report result > givea name.xml > Apply > Save
Step 8: Install junit plugin (Deploy to container)
Step 9: Create FOurth Job
Use Custom Workspace location = $(JENKINS_HOME)/workspace/samplewebapp
Source code management: Git
Build Steps > Invite ANT > Target: war > Add post build ation : Deploy was/ear container > click on ?? and paste the example provided on it like **/*.war > Cntext path: outputname > Add containers: Tomcat 8. > Credentials= Tomcat admin login credentials, URL: Tomcat admin URL > givea name.xml > Apply > Save
Step 10: Install Junkin plugin "Build Pipeline"
Step 11: Firstjob > configuration > Build Triggers > Post Build Actions > Projects to build = Secondjob
Secondjob > configuration > Build Triggers > Post Build Actions > Projects to build = Thirdjob
Thirdjob > configuration > Build Triggers > Post Build Actions > Projects to build = Fourthjob
Step 12: Dashbord > click on + > Complete_pipeline > Select Build pipeline view > Create > Select Initial Job = Firstjob > Apply
Step 13: First job > Configuration > Poll SCM > Schedule * * * * * > Apply //This is to execute the first project every minutes
Check Complete_pipeline paje in Jenkins
It deploy war file at Tomact_HOME directory, Webaps