From 637b56d0a7ec9e8849d3298f44e1bd8bdff734ae Mon Sep 17 00:00:00 2001 From: VSAzima Date: Fri, 23 Apr 2021 13:12:47 +0400 Subject: [PATCH] back to origins def --- Jenkinsfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 750412c21..1df70dcd6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,10 +50,7 @@ pipeline { // } stage('push') { steps { - script { - checkout scm; - echo "check-check"; - pom = readMavenPom file: "pom.xml"; + def 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; @@ -62,7 +59,7 @@ pipeline { // if(artifactExists) { // echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}"; - nexusArtifactUploader nexusVersion: ${env.NEXUS_VERSION}, protocol: ${env.NEXUS_PROTOCOL}, nexusUrl: ${env.NEXUS_URL}, groupId: pom.groupId, version: pom.version, repository: ${env.NEXUS_REPOSITORY}, credentialsId: ${env.NEXUS_CREDENTIAL_ID}, artifacts: [ + def nexusArtifactUploader nexusVersion: ${env.NEXUS_VERSION}, protocol: ${env.NEXUS_PROTOCOL}, nexusUrl: ${env.NEXUS_URL}, groupId: pom.groupId, version: pom.version, repository: ${env.NEXUS_REPOSITORY}, credentialsId: ${env.NEXUS_CREDENTIAL_ID}, artifacts: [ [artifactId: pom.artifactId, classifier: '', file: artifactPath,