cluster_cleanup_dev.groovy 449 字节
Newer Older
1
try {
2
    def result = sh script: "helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster", returnStatus: true
Q
quicksilver 已提交
3
    if (!result) {
4
        sh "helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
J
Jeff 已提交
5
    }
6
} catch (exc) {
7
    def result = sh script: "helm status ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster", returnStatus: true
Q
quicksilver 已提交
8
    if (!result) {
9 10
        sh "helm del --purge ${env.JOB_NAME}-${env.BUILD_NUMBER}-cluster"
    }
11 12 13
    throw exc
}