Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.14 KB

VerifyDeploy.md

File metadata and controls

37 lines (27 loc) · 1.14 KB
title description
Verify Your Deployment in Jenkins Pipeline
Verify deployment completes before running functional tests.

Issue:

Need to verify if deployment completed before running functional test

Solution:

Add line to Jenkinsfile:

openshiftVerifyDeployment depCfg: '[dev-deploy-config]', namespace: '[dev-namespace]', replicaCount: 1, verbose: 'false', verifyReplicaCount: 'false'

Example:

openshiftVerifyDeployment depCfg: 'platform-dev', namespace: 'devex-platform-dev', replicaCount: 1, verbose: 'false', verifyReplicaCount: 'false'

Grant access for Jenkins to dev env:

oc policy add-role-to-user view -z system:serviceaccount:[tools-namespace]:jenkins -n [dev-namespace]

Example:

oc policy add-role-to-user view -z system:serviceaccount:devex-platform-tools:jenkins -n devex-platform-dev 

Note:

openshiftVerifyDeployment needs the deploy to have started, otherwise with the Rolling deployment strategy when verifying` the replica count verifyDeploy returns too early. This can be archived by adding a sleep 5 before the verifyDeploy step.

See https://github.com/BCDevOps/jenkins-pipeline-shared-lib