I have a plugin in Jenkins that operates a remote server via rest.
How can I send one last request to the server on build abort? Thus, gracefully finishing the work of the plugin?
The only reference to the 'Abort sequence' that I found is this. Which makes me think that the procedure is very rough, and that I can't catch the signal before it terminates the child (my plugin).
Fortunately, the most common reasons your Jenkins instance is slow are easy to diagnose and correct: Non-performant plugins. Poorly tuned JVM arguments. Non-optimal garbage collection.
I have a similar need, which I solved with the PostBuildScript Plugin.
I choose to run a build step, but you can run several other options. Very easy to use. I have a script I must run regardless of how the build ended (success, fail or abort). It works great for me.
I hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With