when else

This commit is contained in:
VSAzima 2021-04-22 20:30:10 +04:00
parent 41e2d23120
commit aea1b7d7c6

4
Jenkinsfile vendored
View file

@ -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 {
]
);
}
}
}
}
}