Jenkins kills its process (Pipelines + Jobs)

2018, Nov 11

Processes that are spawned by Jenkins are killed when the job ends. See ProcessTreeKiller documentation.

Freestyle Jobs

If you used Freestyle Jobs, maybe you know that you need to change the BUILD_ID variable to not have processes killed by Jenkins, with:

BUILD_ID='dontKillme'

Pipelines

If you use Jenkins pipelines and you have this problem, you need to change JENKINSNODECOOKIE variable:

JENKINS_NODE_COOKIE='dontKillme'