Kills me that BUILD_ID=dontKillMe

506 views
Skip to first unread message

Ioannis Moutsatsos

unread,
Jan 17, 2018, 11:25:41 AM1/17/18
to Jenkins Users
I have recently upgraded to Jenkins v2.100 from v2.93 and all the security plugins that came along for the ride.
The upgrade broke all the jobs where in Groovy scripts and properties I was using the BUILD_ID environment variable to create unique names for folders and files. 

The BUILD_ID (which up to this point was equal to BUILD_NUMBER) is now set to 'dontKillMe'

Is there an option to disable this? I want BUILD_ID=BUILD_NUMBER

Best regards
Ioannis

Simon Richter

unread,
Jan 17, 2018, 2:07:58 PM1/17/18
to jenkins...@googlegroups.com
Hi,

Am 17.01.2018 um 17:25 schrieb Ioannis Moutsatsos:

> The BUILD_ID (which up to this point was equal to BUILD_NUMBER) is now
> set to 'dontKillMe'

I dimly remember that this is a way to tell the cleanup code that kills
all processes after the build has finished to ignore certain processes.

On Windows with Visual Studio, this is often needed because pdbserv.exe
is shared between builds, so if the build that initially started it
finishes, all the other builds that are still running will fail.

Not sure why this is set now, but I'd suspect a plugin rather than
Jenkins core here.

Simon

signature.asc

Ioannis Moutsatsos

unread,
Jan 19, 2018, 2:45:48 PM1/19/18
to Jenkins Users
Simon your suspicion was correct! Thank you!

After downgrading several plugins, I was able to isolate the issue with the EnvInject Plugin v2.1.5
This version of the plugin seems to inject 'dontKillMe' as the BUILD_ID for a build. This behavior is not present in EnvInject Plugin v2.13
So, I have now settled to v2.1.3 as the latest version of the plugin to install.

Best regards
Ioannis

Abhishek Chordia

unread,
Jan 27, 2018, 4:21:29 AM1/27/18
to Jenkins Users
Hi,

Recently i have started working on jenkinsfile for pipeline purpose, where my job stop once jenkinsfile process complete, please help me got this corrected, below is sample file : 

=======================================================================================================================================
pipeline {
  agent {
label 'master'
  }
  
  tools { 
        maven 'APACHE_MAVEN' 
    }
  
  stages {
    
    stage('Kill Process') {
      steps {
sh 'lsof -ti :6001 | xargs --no-run-if-empty kill -9'
      }
    }
    
    stage('Build Stage') {
      steps {
        sh 'mvn clean package install -DskipTests -Dspring.profiles.active=uat'
      }
    }
    
    stage('Testing Stage') {
      steps {
        echo "Testing Stage"
      }
    }
    
    stage('Deployement Stage') {
      steps {
        sh 'cd ./sms-server && BUILD_ID=dontKillMe nohup mvn spring-boot:run -DskipTests -Dserver.port=6001 -Dspring.profiles.active=development &'
      }
    }
    
   stage('URL Response') {
      steps {
sleep 10
        sh 'curl http://localhost:8085/healthcheck'
      }
    }

  }
}


=======================================================================================================================================
Reply all
Reply to author
Forward
0 new messages