milvus/ci/jenkinsfile/cluster_cleanup_dev.groovy
quicksilver f9b0050cdb MS-215 - add milvus cluster CI/CD groovy file
Former-commit-id: 61d3f98595be12a26c8563ee369d0f5526c407e8
2019-07-14 21:50:48 +08:00

14 lines
449 B
Groovy

try {
def result = sh script: "helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster", returnStatus: true
if (!result) {
sh "helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
}
} catch (exc) {
def result = sh script: "helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster", returnStatus: true
if (!result) {
sh "helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
}
throw exc
}