From dc4169284beb616ff53eee78d05efdda4ba48d96 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 13 May 2024 08:46:55 +0200 Subject: [PATCH] Fix Copy Artifacts stage in stage3 in case that tree fails Change-Id: I96b4dd28a8df5374ec0990790a5d69d7fc06fe3a Signed-off-by: garciadeblas --- jenkins/ci-pipelines/ci_stage_3.groovy | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 9d5a6e4c..0102e2f2 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -216,10 +216,9 @@ node("${params.NODE}") { stage('Copy Artifacts') { // cleanup any previous repo println("Logging system info before deleting repo.") - sh("pwd") - sh("tree -fD repo") - println("Trying to delete previous repo...") - sh("rm -rfv repo") + sh "tree -fD repo || exit 0" + sh 'rm -rvf repo' + sh "tree -fD repo && lsof repo || exit 0" dir('repo') { packageList = [] dir("${RELEASE}") { -- 2.25.1