From aea1b7d7c657d847cb3bd7afeb0f6eb16cfc5b2b Mon Sep 17 00:00:00 2001 From: VSAzima Date: Thu, 22 Apr 2021 20:30:10 +0400 Subject: [PATCH] when else --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 94e8d00b2..feb283ddb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,12 +27,13 @@ pipeline { stage('push') { steps { script { - checkout scm; pom = readMavenPom file: "pom.xml"; filesByGlob = findFiles(glob: "target/*.${pom.packaging}"); echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}" artifactPath = filesByGlob[0].path; artifactExists = fileExists artifactPath; + } + when(artifactExists) { nexusArtifactUploader( nexusVersion: NEXUS_VERSION, @@ -54,6 +55,7 @@ pipeline { ] ); } + } } } }