我们部署了jenkins的Pipeline的打包方式,通知需要使用企业微信。
参考官方
https://github.com/jenkinsci/qy-wechat-notification-plugin

pipeline {
    agent any

    stages {
        stage('Hello') {
            steps {
                echo 'Hello World'
            }
        }
    }
    post{
        success{
            qyWechatNotification failNotify: true, mentionedId: '需要通知UserID', mentionedMobile: '需要通知的通知手机号码', webhookUrl: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx-xxxxxx-xxxxxx'
        }
        failure{
            qyWechatNotification failNotify: true, mentionedId: '需要通知UserID', mentionedMobile: '需要通知的通知手机号码', webhookUrl: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx-xxxxxx-xxxxxx'
        }
    }

我的是k8s的部署方式
打包配置如下
2022-07-18T10:03:08.png

通知结果如下
2022-07-18T10:02:11.png

Last modification:September 2, 2022
如果觉得我的文章对你有用,请随意赞赏