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"); + } }