From 4df2042d1ebf24adcb2918a05821ebc977f7845f Mon Sep 17 00:00:00 2001 From: Yuxiang Zhu Date: Mar 14 2019 05:49:50 +0000 Subject: CI/CD: Delete replication controllers explicitly We have seen cases that replication controllers are not deleted automatically when associated deployment config is deleted. --- diff --git a/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile b/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile index ff33706..f7316ed 100644 --- a/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile +++ b/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile @@ -151,8 +151,12 @@ pipeline { openshift.withCluster() { /* Tear down everything we just created */ echo "Tearing down test resources..." - openshift.selector('dc,deploy,configmap,secret,svc,route', + try { + openshift.selector('dc,deploy,rc,configmap,secret,svc,route', ['environment': env.ENVIRONMENT_LABEL]).delete() + } catch (e) { + echo "Failed to tear down test resources: ${e.message}" + } } } }