From 41e2d231204d010082fab23da310a04021b21620 Mon Sep 17 00:00:00 2001 From: VSAzima Date: Thu, 22 Apr 2021 20:25:09 +0400 Subject: [PATCH] when else --- Jenkinsfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 689603cc9..94e8d00b2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,15 +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) { - echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}"; - nexusArtifactUploader( nexusVersion: NEXUS_VERSION, protocol: NEXUS_PROTOCOL, @@ -55,7 +53,7 @@ pipeline { type: "pom"] ] ); - } + } } } }