jenkins插件:企业微信Jenkins构建通知插件Qy Wechat Notification

jenkins插件地址


https://plugins.jenkins.io/qy-wechat-notification/

GitHub地址


https://github.com/jenkinsci/qy-wechat-notification-plugin

配置及使用

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

pipeline

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', moreInfo:'额外的信息'
        }
        failure{
    
    
            qyWechatNotification failNotify: true, mentionedId: '需要通知UserID', mentionedMobile: '需要通知的通知手机号码', webhookUrl: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx-xxxxxx-xxxxxx', moreInfo:'额外的信息'
        }
    }
}

运行效果

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

项目开发

mvn org.jenkins-ci.tools:maven-hpi-plugin:run
  • 打开Jenkins地址
http://127.0.0.1:8080/jenkins
  • 项目DEBUG
set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
  • 项目打包
mvn package

猜你喜欢

转载自blog.csdn.net/a772304419/article/details/132274448