I have a groovy script that goes and promotes the code. In short, I know at some point in this script if it was successful or not. I would refuse to build if I was not successful. Is there a way in groovy build failure?
Example:
in the "execute groovy script" plugin. you can write the code.
(insert API call to promote code)
if(checkPromote()){
//fail build here
}
where 'checkPromote' returns a true or false value depending on the status of the advertiser.
Eddie source
share