mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-26 00:45:50 +00:00
sample
This commit is contained in:
parent
c9c73ddb30
commit
9c9c66f745
1 changed files with 22 additions and 21 deletions
43
Jenkinsfile
vendored
43
Jenkinsfile
vendored
|
@ -50,27 +50,28 @@ pipeline {
|
||||||
// }
|
// }
|
||||||
stage('push') {
|
stage('push') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
nexusPublisher nexusInstanceId: 'maven-nexus-repo', nexusRepositoryId: 'maven-releases', packages: [[$class: 'MavenPackage', mavenAssetList: [[classifier: '', extension: '.jar', filePath: '/target/']], mavenCoordinate: [artifactId: 'spring-petclinic', groupId: 'org.springframework.samples', packaging: 'pom', version: '2.4.2']]]
|
||||||
pom = readMavenPom file: "pom.xml";
|
// script {
|
||||||
filesByGlob = findFiles(glob: "target/*.${pom.packaging}");
|
// pom = readMavenPom file: "pom.xml";
|
||||||
echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}"
|
// filesByGlob = findFiles(glob: "target/*.${pom.packaging}");
|
||||||
artifactPath = filesByGlob[0].path;
|
// echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}"
|
||||||
artifactExists = fileExists artifactPath;
|
// artifactPath = filesByGlob[0].path;
|
||||||
//
|
// artifactExists = fileExists artifactPath;
|
||||||
// if(artifactExists) {
|
// //
|
||||||
// echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
|
// // 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: [
|
//
|
||||||
[artifactId: pom.artifactId,
|
// 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: [
|
||||||
classifier: '',
|
// [artifactId: pom.artifactId,
|
||||||
file: artifactPath,
|
// classifier: '',
|
||||||
type: pom.packaging],
|
// file: artifactPath,
|
||||||
[artifactId: pom.artifactId,
|
// type: pom.packaging],
|
||||||
classifier: '',
|
// [artifactId: pom.artifactId,
|
||||||
file: "pom.xml",
|
// classifier: '',
|
||||||
type: "pom"]
|
// file: "pom.xml",
|
||||||
]
|
// type: "pom"]
|
||||||
;
|
// ]
|
||||||
|
// ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// } else {
|
// } else {
|
||||||
|
|
Loading…
Reference in a new issue