Question

I have a scheduled build in Jenkins which runs everyday at 12:00 AM. I want to set up a CI server for my project. I want to set it such a way that before every build, my application is undeployed and once the build is successful, it's deployed and up again, running on the server. This is possible if I manually add some server in my system and put the shell command in pre-build and post-build actions to undeploy and deploy manually but is it possible directly with Jenkins? As the name suggests, Jenkins - CI server, is there any way how can I do it with Jenkins?

Note: I have maven jetty plugin and have set a goal clean install jetty:run in my application but it doesn't suit my requirement in Jenkins for CI server.

No correct solution

OTHER TIPS

Yes, Jenkins will run any script at any time, so you can do this very easily. You don't need to use pre- and post-build actions. Build steps work very well for this use. You can add multiple steps to a single Jenkins job/project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top