- Install 'deploy to container' plugin. This plugin needs to deploy on tomcat server.
- Install 'deploy to container' plugin without restart
Manage Jenkins
>Jenkins Plugins
>available
>deploy to container
- Jenkins should need access to the tomcat server to deploy build artifacts. setup credentials to enable this process. use credentials option on Jenkins home page.
- setup credentials
credentials
>jenkins
>Global credentials
>add credentials
- Username :
deployer
- Password :
deployer
- id :
deployer
- Description:
user to deploy on tomcat server
Enter an item name: JavaApp
Source Code Management:
- Repository: https://github.com/rajkumargupta14/hello-world-1
- Branches to build :
*/master
Poll SCM : -
* * * *
Build:
- Root POM:
pom.xml
- Goals and options:
clean install package
- Root POM:
Post-build Actions
- Deploy war/ear to container
- WAR/EAR files :
**/*.war
- Containers :
Tomcat 8.x
- Credentials:
deployer
(user created on above) - Tomcat URL :
http://<PUBLIC_IP>:8080
- Credentials:
- WAR/EAR files :
- Deploy war/ear to container
Save and run the job now. Once done access by using Public IP and port number 8080
No comments:
Post a Comment