Open jglick opened 3 years ago
why JFR behavior for Pipeline termination should be different from classic Jenkins
Because in a Jenkins server, exiting should not interrupt running Pipelines. That would obviate all the durability features of Pipeline! Whereas if a JFR container dies for whatever reason while a build was in progress, clearly that build is going to die as well, so you should give it the chance to clean up a bit: send any “aborted” notifications, release locks on external services, whatever.
To be more useful, this should probably wait (up to ~10s) for the build to terminate on its own. The current code sends an abort signal but then allows JVM shutdown to proceed in parallel.
proceed with Jenkins Pipeline execution when used in the CLI mode with external JENKINS_HOME
Sorry, what?
Untested, but should offer better cleanup behavior in case the Pipeline is using any external resources.