Update Jenkinsfile

This commit is contained in:
Andrew Pitt 2020-03-16 16:47:21 -04:00 committed by GitHub
parent 35c7569f2e
commit 18628bb833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

28
Jenkinsfile vendored
View file

@ -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")
}
}
} }
} }
} }