mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 07:15:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
35c7569f2e
commit
18628bb833
1 changed files with 12 additions and 24 deletions
28
Jenkinsfile
vendored
28
Jenkinsfile
vendored
|
@ -54,17 +54,11 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Tag DEV') {
|
stage("Tag DEV") {
|
||||||
agent {
|
echo "Tag image to DEV"
|
||||||
label 'jenkins-slave-skopeo'
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
openshift.withCluster() {
|
openshift.withCluster() {
|
||||||
withCredentials([usernamePassword(credentialsId: "${openshift.project()}-quay-creds-secret", usernameVariable: "QUAY_USERNAME", passwordVariable: "QUAY_PASSWORD")]) {
|
openshift.withProject('cicd') {
|
||||||
sh "skopeo copy docker://quay.io/${QUAY_USERNAME}/${appName}:latest docker://quay.io/${QUAY_USERNAME}/${appName}:dev --src-creds \"$QUAY_USERNAME:$QUAY_PASSWORD\" --dest-creds \"$QUAY_USERNAME:$QUAY_PASSWORD\" --src-tls-verify=false --dest-tls-verify=false"
|
openshift.tag("${appName}:latest", "${appName}:dev")
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,17 +83,11 @@ pipeline {
|
||||||
sh "mvn verify -Pfailsafe"
|
sh "mvn verify -Pfailsafe"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Tag UAT') {
|
stage("Tag UAT") {
|
||||||
agent {
|
echo "Tag image to UAT"
|
||||||
label 'jenkins-slave-skopeo'
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
openshift.withCluster() {
|
openshift.withCluster() {
|
||||||
withCredentials([usernamePassword(credentialsId: "${openshift.project()}-quay-creds-secret", usernameVariable: "QUAY_USERNAME", passwordVariable: "QUAY_PASSWORD")]) {
|
openshift.withProject('cicd') {
|
||||||
sh "skopeo copy docker://quay.io/${QUAY_USERNAME}/${appName}:dev docker://quay.io/${QUAY_USERNAME}/${appName}:uat --src-creds \"$QUAY_USERNAME:$QUAY_PASSWORD\" --dest-creds \"$QUAY_USERNAME:$QUAY_PASSWORD\" --src-tls-verify=false --dest-tls-verify=false"
|
openshift.tag("${appName}:dev", "${appName}:uat")
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue