Jenkins Pipeline: hang on withEnv

376 views
Skip to first unread message

Allen Fisher

unread,
Jun 20, 2017, 12:04:50 PM6/20/17
to Jenkins Users
Hi All--

I tried to update to 2.46.3 today and for various reasons had to downgrade back to 2.32.3. After the rollback, which was accomplished by restoring to a VM snapshot, all my pipeline builds that use Gradle hang right after the build finishes, and the build has to be force killed. From the log:

BUILD SUCCESSFUL
Total time: 1 mins 3.171 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Aborted by unknown
Click here to forcibly terminate running steps
Terminating withEnv
Click here to forcibly kill entire build
Hard kill!
Finished: ABORTED

Here's my code:

stage('Build File'){
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[credentialsId: '9751a73d-c430-4f9c-9de5-4211f3be7c1d', url: 'g...@gitlab.mydomain.com:myproduct/foo.git']]])
tool name: 'gradle214', type: 'gradle'
sh "echo Starting Build..."
withEnv(["PATH+GRADLE=${tool 'gradle214'}/bin"]){
sh "gradle all -DisQUABuild=${isQUABuild}"
}
sh "echo ending build..." //never gets to this sh call!

Any suggestions on what to troubleshoot? This is a linux build machine. I've tried restarting Jenkins, the build box, everything and I'm still hanging.

Thanks!

Allen

Allen Fisher

unread,
Jun 20, 2017, 12:18:21 PM6/20/17
to Jenkins Users
This is weird... I added another debugging echo statement right below the sh "gradle all -D..." This made my hanging builds no longer hang.

Allen
Reply all
Reply to author
Forward
0 new messages