CancelDownstream
Closed this issue · 5 comments
First of all amazing script. I was looking for this script for a really longtime. Quick question so when i secute the Groovy Script as Postbuild step i am seeing an exception
No signature of method: Script1.CancelDownstream() is applicable for argument types:(hudson.model.Hudson, hudson.model.FreeStyleBuild, java.io.PrintStream)
Do i need to import the hudson model?
Glad you're finding this useful!
I have to admit I don't really know groovy at all and just tried things until something worked. Here is how we call the script:
new CancelDownstream(manager.hudson, manager.build, manager.listener.logger).run()
We also have this in our "additional classpath" section: /var/lib/jenkins/jobs/make-check/workspace/jenkins-tools/Cancel.jar
I hope that helps!
We do it in groovy postbuild. I assume it would work similarly in other plugins, but the intention was to cancel at the end of a job (when it fails), so groovy postbuild makes the most sense.
This is extremely and there is no action item for us - closing.