From: garciadeblas Date: Mon, 13 May 2024 06:46:55 +0000 (+0200) Subject: Fix Copy Artifacts stage in stage3 in case that tree fails X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fv12.0;p=osm%2Fdevops.git Fix Copy Artifacts stage in stage3 in case that tree fails Change-Id: I96b4dd28a8df5374ec0990790a5d69d7fc06fe3a Signed-off-by: garciadeblas --- 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}") {