From b3bbab871e4320ae8541133fb6b2638442820a67 Mon Sep 17 00:00:00 2001 From: Robert Brown Date: Thu, 9 Aug 2018 13:19:20 -0700 Subject: [PATCH] Move checkout inside try block Prior to this commit the checkout call was outside the try block. This commit fixes that by moving the checkout into the try block incase it fails and the working directory still needs to be cleaned up. --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 037a169f..e05c7292 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,9 +17,9 @@ node { def platform = platforms[platform_idx] builds[platform] = { node { - checkout scm - try { + checkout scm + image = docker.build("cmake-build:${env.BUILD_ID}") stage("Build ${platform}") {