Update Jenkinsfile

Revert to simple if condition check
pull/3/head
Hammy 3 years ago
parent 8e51c55300
commit 6faf748377

40
Jenkinsfile vendored

@ -58,25 +58,29 @@ pipeline {
} }
} }
echo "*** File: ${javadocsArtifact}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}"; if (fileExists(javadocsArtifact) && fileExists(jarWithSourcesArtifact) && fileExists(jarArtifact)) {
echo "*** File: ${jarWithSourcesArtifact}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}"; echo "*** File: ${javadocsArtifact}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
echo "*** File: ${jarArtifact}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}"; echo "*** File: ${jarWithSourcesArtifact}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
echo "*** File: ${jarArtifact}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
nexusArtifactUploader( nexusArtifactUploader(
nexusVersion: NEXUS_VERSION, nexusVersion: NEXUS_VERSION,
protocol: NEXUS_PROTOCOL, protocol: NEXUS_PROTOCOL,
nexusUrl: NEXUS_URL, nexusUrl: NEXUS_URL,
groupId: pom.groupId, groupId: pom.groupId,
version: pom.version, version: pom.version,
repository: NEXUS_REPOSITORY, repository: NEXUS_REPOSITORY,
credentialsId: NEXUS_CREDENTIAL_ID, credentialsId: NEXUS_CREDENTIAL_ID,
artifacts: [ artifacts: [
[artifactId: pom.artifactId, classifier: 'normal', file: jarArtifact, type: pom.packaging], [artifactId: pom.artifactId, classifier: 'normal', file: jarArtifact, type: pom.packaging],
[artifactId: pom.artifactId, classifier: 'javadocs', file: javadocsArtifact, type: pom.packaging], [artifactId: pom.artifactId, classifier: 'javadocs', file: javadocsArtifact, type: pom.packaging],
[artifactId: pom.artifactId, classifier: 'sources', file: jarWithSourcesArtifact, type: pom.packaging], [artifactId: pom.artifactId, classifier: 'sources', file: jarWithSourcesArtifact, type: pom.packaging],
[artifactId: pom.artifactId, classifier: '', file: "pom.xml", type: "pom"] [artifactId: pom.artifactId, classifier: '', file: "pom.xml", type: "pom"]
] ]
) )
} else {
error "*** Files could not be found";
}
} }
} }
} }

Loading…
Cancel
Save