Update Jenkinsfile

This commit is contained in:
Andrew Pitt 2020-01-04 18:28:35 -05:00 committed by GitHub
parent 06f5ab6d81
commit aa45e696a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

8
Jenkinsfile vendored
View file

@ -42,8 +42,8 @@ try {
stage("Tag DEV") { stage("Tag DEV") {
echo "Tag image to DEV" echo "Tag image to DEV"
openshift.withCluster() { openshift.withCluster() {
withCredentials([usernamePassword(credentialsId: "cicd-quay-creds-secret", usernameVariable: "QUAY_USER", passwordVariable: "QUAY_PASSWORD")]) { withCredentials([usernamePassword(credentialsId: "cicd-quay-creds-secret", usernameVariable: "QUAY_USERNAME", passwordVariable: "QUAY_PASSWORD")]) {
sh "skopeo copy docker://quay.io/${QUAY_USERNAME}/${appName}:latest docker://quay.io/${QUAY_USERNAME}/${appName}:dev --src-creds \"$QUAY_USER:$QUAY_PASSWORD\" --dest-creds \"$QUAY_USER:$QUAY_PASSWORD\" --src-tls-verify=false --dest-tls-verify=false" 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"
} }
} }
} }
@ -61,8 +61,8 @@ try {
stage("Tag for QA") { stage("Tag for QA") {
echo "Tag to UAT" echo "Tag to UAT"
openshift.withCluster() { openshift.withCluster() {
withCredentials([usernamePassword(credentialsId: "cicd-quay-creds-secret", usernameVariable: "QUAY_USER", passwordVariable: "QUAY_PASSWORD")]) { withCredentials([usernamePassword(credentialsId: "cicd-quay-creds-secret", usernameVariable: "QUAY_USERNAME", passwordVariable: "QUAY_PASSWORD")]) {
sh "skopeo copy docker://quay.io/${QUAY_USERNAME}/${appName}:dev docker://quay.io/${QUAY_USERNAME}/${appName}:uat --src-creds \"$QUAY_USER:$QUAY_PASSWORD\" --dest-creds \"$QUAY_USER:$QUAY_PASSWORD\" --src-tls-verify=false --dest-tls-verify=false" 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"
} }
} }
} }