Skip to content

Commit

Permalink
Change tag to use Openshift plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
malacourse committed Aug 23, 2017
1 parent c93f8c0 commit d0d4204
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions basic-tomcat/pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,28 @@ node('maven') {

openshiftVerifyDeployment(deploymentConfig: "${env.APP_NAME}", namespace: "${STAGE1}", verifyReplicaCount: true)

input "Promote Application to Stage?"
//input "Promote Application to ${env.STAGE2}?"
}

stage("Promote To ${env.STAGE2}") {
sh """
${env.OC_CMD} tag ${env.STAGE1}/${env.APP_NAME}:latest ${env.STAGE2}/${env.APP_NAME}:latest
"""
openshiftTag (alias: 'true', apiURL: "${ocpApiServer}",
authToken: "${env.TOKEN}", destStream: "${env.APP_NAME}",
destTag: 'latest', destinationAuthToken: "${env.TOKEN}", destinationNamespace: "${env.STAGE2}",
namespace: "${env.STAGE1}", srcStream: "${env.APP_NAME}", srcTag: 'latest', verbose: 'false')
}

stage("Verify Deployment to ${env.STAGE2}") {

openshiftVerifyDeployment(deploymentConfig: "${env.APP_NAME}", namespace: "${STAGE2}", verifyReplicaCount: true)

input "Promote Application to Prod?"
//input "Promote Application to ${env.STAGE3}?"
}

stage("Promote To ${env.STAGE3}") {
sh """
${env.OC_CMD} tag ${env.STAGE2}/${env.APP_NAME}:latest ${env.STAGE3}/${env.APP_NAME}:latest
"""
openshiftTag (alias: 'true', apiURL: "${ocpApiServer}",
authToken: "${env.TOKEN}", destStream: "${env.APP_NAME}",
destTag: 'latest', destinationAuthToken: "${env.TOKEN}", destinationNamespace: "${env.STAGE3}",
namespace: "${env.STAGE2}", srcStream: "${env.APP_NAME}", srcTag: 'latest', verbose: 'false')
}

stage("Verify Deployment to ${env.STAGE3}") {
Expand Down

0 comments on commit d0d4204

Please sign in to comment.