How to setup Hudson to do remote deployment of WAR to Tomcat?
I have bit of experience in running a simple build upon every SVN commit (it is a piece of cake)
Regarding deployment of t开发者_JAVA技巧he war to a remote production server via Hudson, there seem to be some alternatives:
- use the 'deploy' target in the app's build.xml
- use the deploy-plugin of Hudson
which I fail to get working :(
What is the simplest way to do a remote deployment to Tomcat? Are there any examples available? And what about release management? How do we tag our releases in your SCM?
I use Maven for builds.
Since I am working with WAS I use the WAS Builder Plugin for deployment. However, I could also just fire up a batch/shell script for deployment. My current approach is to use slaves that run on the target machine where I want to deploy and assign my deployment jobs to them.
For tagging you can use whatever you prefer. The are 3 basic options:
- Let maven do it
- run a command line command
- use a Hudson plugin
We use subversion, so the Subversion Tagging Plugin would be a natural match. However, we don't use Hudson for tagging right now. However, there are several plugins out there for different SCMs. I usually prefer a plugin over a command line, one reason is that company policy forbids to store passwords unencrypted and it is usually fairly easy to configure.
Our strategy has been to combine the promoted builds plugin and the deploy plugin in hudson. Then, when something is "promoted," send an email and do the deployment. The deployment plugin is cargo based and works with a variety of web and app servers.
Maybe post a little info about why the deploy plugin isn't working for you?
精彩评论