I currently have a build that is automated using Jenkins. The Jenkins build/deploy job builds a Java EAR using maven and then deploys the built EAR to a server.
I want to integrate Spock testing into this build/deploy flow. Once the EAR is build, I want to run the Spock tests against the EAR code. If all the tests pass, then I want to continue with the deployment of the EAR. If one or more of the tests fail, then I want the Jenkins build/deploy job to fail and return an error.
I would also like to display a summary of the test results regardless of whether they are pass or fail.
What changes would I need to make to the Jenkins build/deploy job, the maven project that actually builds the EAR and/or the Spock tests in order to accomplish this?