mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-26 00:45:50 +00:00
when else
This commit is contained in:
parent
41e2d23120
commit
aea1b7d7c6
1 changed files with 3 additions and 1 deletions
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
|
@ -27,12 +27,13 @@ pipeline {
|
||||||
stage('push') {
|
stage('push') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
checkout scm;
|
|
||||||
pom = readMavenPom file: "pom.xml";
|
pom = readMavenPom file: "pom.xml";
|
||||||
filesByGlob = findFiles(glob: "target/*.${pom.packaging}");
|
filesByGlob = findFiles(glob: "target/*.${pom.packaging}");
|
||||||
echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}"
|
echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}"
|
||||||
artifactPath = filesByGlob[0].path;
|
artifactPath = filesByGlob[0].path;
|
||||||
artifactExists = fileExists artifactPath;
|
artifactExists = fileExists artifactPath;
|
||||||
|
}
|
||||||
|
when(artifactExists) {
|
||||||
|
|
||||||
nexusArtifactUploader(
|
nexusArtifactUploader(
|
||||||
nexusVersion: NEXUS_VERSION,
|
nexusVersion: NEXUS_VERSION,
|
||||||
|
@ -54,6 +55,7 @@ pipeline {
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue