ci: 清理build_parent和build_sdk

This commit is contained in:
CaptainB 2022-10-26 15:47:28 +08:00
parent 945fd3bc31
commit 073b5da691
1 changed files with 4 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -139,9 +139,12 @@ pipeline {
post('Notification') { post('Notification') {
always { always {
sh "echo \$WEBHOOK\n" sh "echo \$WEBHOOK\n"
withCredentials([string(credentialsId: 'wechat-bot-webhook', variable: 'WEBHOOK')]) {
qyWechatNotification failNotify: true, mentionedId: '', mentionedMobile: '', webhookUrl: "$WEBHOOK"
}
script { script {
try { try {
if ("$BUILD_PARENT".equals("true") || "$BUILD_SDK".equals("true")) { if (env.BUILD_PARENT || env.BUILD_SDK) {
println "JOB_NAME=$JOB_NAME, BUILD_NUMBER=$BUILD_NUMBER, BUILD_URL=$BUILD_URL" println "JOB_NAME=$JOB_NAME, BUILD_NUMBER=$BUILD_NUMBER, BUILD_URL=$BUILD_URL"
Hudson.instance.getItemByFullName("$JOB_NAME").builds.each { Hudson.instance.getItemByFullName("$JOB_NAME").builds.each {
if(it.number == Integer.parseInt("$BUILD_NUMBER")) { if(it.number == Integer.parseInt("$BUILD_NUMBER")) {
@ -154,9 +157,6 @@ pipeline {
} catch (NoSuchElementException) { } catch (NoSuchElementException) {
} }
} }
withCredentials([string(credentialsId: 'wechat-bot-webhook', variable: 'WEBHOOK')]) {
qyWechatNotification failNotify: true, mentionedId: '', mentionedMobile: '', webhookUrl: "$WEBHOOK"
}
} }
} }
} }