Before Moving Further I would
highly recommend you to visit this blog, To understand how to set up Tomcat
Server for web-application deployment.
Now
let’s configure our Jenkins Job for Automatic Deployment.
1)
Log in into Jenkins-->Manage
Jenkins and Install Deploy to container Plugin. Please make sure to restart
Jenkins after plugin installation.
2)
On Jenkins Home Page-->New Item Select as FreeStyle or Maven project.
3)
Under Post Build Action, Select
Deploy war/ear to the container.
4)
Provide the Setting as per the below
screenshot. Please Note this example I am deploying Jenkins.war file on
Tomcat Server also we need to make sure that our War/ear file is placed in
Jenkins Workspace inside the Job we have created. Provide the credentials and
tomcat URLs per your setup.
5)
Now apply & Save the Changes
and execute Jenkins Job. Console Output would be
Application
Successfully deployed on port 8181.