From fa0928823d0e2186edaad75934937d138376b720 Mon Sep 17 00:00:00 2001 From: "roberto.cirillo" Date: Tue, 4 Oct 2022 10:06:59 +0200 Subject: [PATCH] FIX ISeMPTY CHECK --- Jenkinsfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6e64102..0d6dbc0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -109,7 +109,9 @@ pipeline { def deployFolder="CD-${env.BUILD_NUMBER}"; println ("searching files in folder ${deployFolder}"); def files = findFiles(glob: "${deployFolder}/*.csv") - if (!files.isEmpty()){ + if (files.isEmpty()){ + println ("Nothing to do"); + }else{ for (def file : files){ echo """ Found: ${file.name} with path ${file.path} @@ -128,8 +130,7 @@ pipeline { } } cleanup(DEPLOY_FILE,BACKUP_FILE); - }else{ - println ("Nothing to do"); + } }