From 368a5b13ab234c602e4b924d9a5202c9c713065a Mon Sep 17 00:00:00 2001 From: VSAzima Date: Thu, 22 Apr 2021 20:10:21 +0400 Subject: [PATCH] when else --- Jenkinsfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a0360d64d..689603cc9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ pipeline { artifactPath = filesByGlob[0].path; artifactExists = fileExists artifactPath; - if(artifactExists) { + when(artifactExists) { echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}"; nexusArtifactUploader( @@ -55,9 +55,7 @@ pipeline { type: "pom"] ] ); - } else { - error "*** File: ${artifactPath}, could not be found"; - } + } } } }