milvus/ci/jenkins/jenkinsfile/cleanupSingleDev.groovy
milvus-ci-robot f099a1ce14 rename env.PIPELIEN_NAME to env.PIPELINE_NAME
Former-commit-id: faf3f207355606dc7e1f2138fb29f4547ac0ea0f
2019-10-18 19:58:20 +08:00

10 lines
345 B
Groovy

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