Thanks! I saw that in the javadoc, but misinterpreted it as meaning that the build would be marked as "aborted".
On Wednesday, 1 October 2014 23:15:09 UTC-7, Vincent Latombe wrote: > > From the javadoc: > > public BuildWrapper.Environment > <http://javadoc.jenkins-ci.org/hudson/tasks/BuildWrapper.Environment.html> > setUp(AbstractBuild > <http://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html> build, > Launcher > <http://javadoc.jenkins-ci.org/hudson/Launcher.html> launcher, > BuildListener > <http://javadoc.jenkins-ci.org/hudson/model/BuildListener.html> listener) > throws IOException > <http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true>, > InterruptedException > <http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true> > > Returns:non-null if the build can continue, null if there was an error > and the build needs to be aborted. > > Vincent > > 2014-10-01 23:16 GMT+02:00 Stuart Rowe <[email protected] <javascript:>>: > >> Hi, >> >> Does anyone how to cause a build to fail during BuildWrapper setUp? For >> my purposes I want to be able to detect situations during this setup where >> the build shouldn't continue. Is this possible? >> >> I've tried setting the buildResult on the AbstractBuild object passed >> into setUp. This successfully fails the build, but not until after build >> steps have been performed. >> >> Thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
