Automated Deployment In Jenkins
Jenkins provides various plugins which can be used to transfer the build files to the respective application or web server after a successful build. This plugin takes a jar or war file and then it deploys to a running remote application server at the end of a build.
1. Install the Deploy to container plugin by going to manage plugin option in ‘Manage Jenkins’.
2. Go to your created build project or you can also configure existing build and click on the Configure option from the left-side of the panel.
3. On the configuration page, click on the Add post-build action button. Select Deploy war/jar to a container option.
4.In this section, enter the information of the server on which the files need to be deployed.
5. Click on the Save button.
6. Now select Build Now.
We have moved our index.html to /var/www/html
Now hit your server IP
This will ensure that all the required files are deployed to the container after the successful build.