Any one facing the same problem and using pipeline project, set JENKINS_NODE_COOKIE
instead of BUILD_ID
.
Dont waste your time setting HUDSON_COOKIE
, HUDSON_SERVER_COOKIE
, JENKINS_COOKIE
or JENKINS_SERVER_COOKIE
. None of them work for pipeline project.
Refer to https://issues.jenkins-ci.org/browse/JENKINS-28182 for more details.