Hi,
I have a request that when current build fails, configuration needs to cancel all existing builds in the queue.
The code probably need to set in "Post-Build Script".
Can someone please provide me with an example code?
Thanks!
Hi,
I have a request that when current build fails, configuration needs to cancel all existing builds in the queue.
The code probably need to set in "Post-Build Script".
Can someone please provide me with an example code?
Thanks!
groovy:
if (build.isFailed()) {
for (eachRequest in system.buildEngine.getBuildRequests(configuration.id)) {
system.buildEngine.cancelRequest(eachRequest.id)
}
}
Hello, enter this code, what your friend gave above, I also entered it once and it was good and the problem disappeared forever