Fix Copy Artifacts stage in stage3 in case that tree fails 73/14373/1 v12.0
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 13 May 2024 06:46:55 +0000 (08:46 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 13 May 2024 06:47:30 +0000 (08:47 +0200)
Change-Id: I96b4dd28a8df5374ec0990790a5d69d7fc06fe3a
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
jenkins/ci-pipelines/ci_stage_3.groovy

index 9d5a6e4..0102e2f 100644 (file)
@@ -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}") {