mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-26 00:45:50 +00:00
back to origins with envs
This commit is contained in:
parent
1b42cf9a76
commit
9cc4619610
1 changed files with 31 additions and 12 deletions
43
Jenkinsfile
vendored
43
Jenkinsfile
vendored
|
@ -36,6 +36,18 @@ pipeline {
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// stage('Publish') {
|
||||||
|
// def pom = readMavenPom file: 'pom.xml'
|
||||||
|
// nexusPublisher nexusInstanceId: 'your-nexus-instance-id', \
|
||||||
|
// nexusRepositoryId: ${env.NEXUS_REPOSITORY}, \
|
||||||
|
// packages: [[$class: 'MavenPackage', \
|
||||||
|
// mavenAssetList: [[classifier: '', extension: '', filePath: "target/${pom.artifactId}-${pom.version}.${pom.packaging}"], \
|
||||||
|
// [classifier: 'sources', extension: '', filePath: "target/${pom.artifactId}-${pom.version}-sources.${pom.packaging}"]], \
|
||||||
|
// mavenCoordinate: [artifactId: "${pom.artifactId}", \
|
||||||
|
// groupId: "${pom.groupId}", \
|
||||||
|
// packaging: "${pom.packaging}", \
|
||||||
|
// version: "${pom.version}-${env.BUILD_NUMBER}"]]]
|
||||||
|
// }
|
||||||
stage('push') {
|
stage('push') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
@ -50,18 +62,25 @@ pipeline {
|
||||||
// if(artifactExists) {
|
// if(artifactExists) {
|
||||||
// echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
|
// echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
|
||||||
|
|
||||||
nexusArtifactUploader(${params.NEXUS_VERSION}, ${params.NEXUS_PROTOCOL}, ${params.NEXUS_URL}, pom.groupId, pom.version, ${params.NEXUS_REPOSITORY}, ${params.NEXUS_CREDENTIAL_ID},
|
nexusArtifactUploader
|
||||||
artifacts: [
|
nexusVersion: ${env.NEXUS_VERSION},
|
||||||
[artifactId: pom.artifactId,
|
protocol: ${env.NEXUS_PROTOCOL},
|
||||||
classifier: '',
|
nexusUrl: ${env.NEXUS_URL},
|
||||||
file: artifactPath,
|
groupId: pom.groupId,
|
||||||
type: pom.packaging],
|
version: pom.version,
|
||||||
[artifactId: pom.artifactId,
|
repository: ${env.NEXUS_REPOSITORY},
|
||||||
classifier: '',
|
credentialsId: ${env.NEXUS_CREDENTIAL_ID},
|
||||||
file: "pom.xml",
|
artifacts: [
|
||||||
type: "pom"]
|
[artifactId: pom.artifactId,
|
||||||
]
|
classifier: '',
|
||||||
);
|
file: artifactPath,
|
||||||
|
type: pom.packaging],
|
||||||
|
[artifactId: pom.artifactId,
|
||||||
|
classifier: '',
|
||||||
|
file: "pom.xml",
|
||||||
|
type: "pom"]
|
||||||
|
]
|
||||||
|
;
|
||||||
// } else {
|
// } else {
|
||||||
// error "*** File: ${artifactPath}, could not be found";
|
// error "*** File: ${artifactPath}, could not be found";
|
||||||
// }
|
// }
|
||||||
|
|
Loading…
Reference in a new issue