Is there a way to copy files to a (temp directory on a) stageing server only if the build and the unit tests succeed?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Note that my answer is
Maven2oriented, so I am not completly sure that it will help you to solve your problem, but maybe be helpful for Java developers…With Maven2, a build is failing if any unit test is failing (however, you have arguments to make the build successfull even with test failures).
You can then attach an Ant task that will copy some files into a directory. If you attach this Ant task in the
packagephase, it will be run after the compilation and the test phase, and then will be executed only if these steps are successfull.Note that if you want to deploy your artifact (i.e. “copy” the WAR into a Tomcat server, for example), there are plugin for that (check Cargo plugin for example).