build: Jenkinsfile 通知使用 post

This commit is contained in:
BugKing 2020-12-21 14:06:32 +08:00
parent 3802dfc7fe
commit 1665e3a97d
1 changed files with 6 additions and 5 deletions

9
Jenkinsfile vendored
View File

@ -24,11 +24,12 @@ pipeline {
sh "docker push ${IMAGE_FREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}" sh "docker push ${IMAGE_FREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}"
} }
} }
stage('Notification') { }
steps { post('Notification') {
always {
sh "echo \$WEBHOOK\n"
withCredentials([string(credentialsId: 'wechat-bot-webhook', variable: 'WEBHOOK')]) { withCredentials([string(credentialsId: 'wechat-bot-webhook', variable: 'WEBHOOK')]) {
qyWechatNotification failSend: true, mentionedId: '', mentionedMobile: '', webhookUrl: '${WEBHOOK}' qyWechatNotification failSend: true, mentionedId: '', mentionedMobile: '', webhookUrl: "$WEBHOOK"
}
} }
} }
} }