This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Jenkins Verify deploy is complete before running functional tests
kuanfandevops edited this page Jan 18, 2018
·
4 revisions
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 doesn't really work well with Rolling deployment strategy when verify the replica count. This is because rolling always has pod running, it only shutdown the old pods when new ones available. openshiftVerifyDeployment returns immediately for rolling deployment. It does work as expected for recreate strategy.