I'm trying to write a plugin that will prevent a build from occurring based on certain conditions. I've tried putting the conditional checks in the prebuild
method (overridden), but from what I can see, the best I can hope to accomplish from there is setting the build status to Result.ABORTED
or Result.FAILURE
.
Does anyone know how to either
remove a build from the build queue without it having any history (i.e, through the prebuild),
OR
What method is used to determine whether or not a build should be allowed?