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,