{"id":15045843,"url":"https://github.com/jenkinsci/qy-wechat-notification-plugin","last_synced_at":"2025-04-08T03:16:24.803Z","repository":{"id":40355611,"uuid":"198428624","full_name":"jenkinsci/qy-wechat-notification-plugin","owner":"jenkinsci","description":"企业微信Jenkins构建通知插件","archived":false,"fork":false,"pushed_at":"2024-08-09T09:12:02.000Z","size":60,"stargazers_count":161,"open_issues_count":6,"forks_count":72,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-31T18:21:36.981Z","etag":null,"topics":["jenkins","notifications","wechat"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/qy-wechat-notification/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-23T12:43:50.000Z","updated_at":"2025-03-11T16:40:40.000Z","dependencies_parsed_at":"2024-09-25T01:58:59.092Z","dependency_job_id":"ade2418d-c394-43cc-a891-429b7718614d","html_url":"https://github.com/jenkinsci/qy-wechat-notification-plugin","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fqy-wechat-notification-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fqy-wechat-notification-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fqy-wechat-notification-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fqy-wechat-notification-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/qy-wechat-notification-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767236,"owners_count":20992548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jenkins","notifications","wechat"],"created_at":"2024-09-24T20:52:20.584Z","updated_at":"2025-04-08T03:16:24.753Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 企业微信Jenkins构建通知插件\n\n[![Build Status](https://ci.jenkins.io/buildStatus/icon?job=Plugins%2Fqy-wechat-notification-plugin%2Fmaster)](https://ci.jenkins.io/job/Plugins/job/qy-wechat-notification-plugin/job/master/)\n[![Jenkins Plugin](https://img.shields.io/jenkins/plugin/v/qy-wechat-notification.svg)](https://plugins.jenkins.io/qy-wechat-notification)\n[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/qy-wechat-notification.svg?color=blue)](https://plugins.jenkins.io/qy-wechat-notification)\n\n\u003e 该插件适用于使用\"企业微信\"工作的小伙伴，在Jenkins项目构建时使用群机器人进行状态通知\n\u003e\n\u003e 需要不低于企业微信 2.8.7版本\n\n## 添加群机器人\n\n#### 任意群成员，都可以通过`右键`群名称的进行添加群机器人\n\n![添加微信机器人](http://cdn.itwake.com/mweb/20190813/15656561814910.jpg)\n\n#### 企业微信会给新增加的群机器人分配一个Webhook，作为通知接口\n\n![添加微信群机器人](http://cdn.itwake.com/FjyselmMyd45a2dMDPD0rYPyJvn9.png)\n\n## Freestyle Job配置\n\n#### 在Jenkins项目底部的`构建后操作`，添加`企业微信通知配置`\n![添加微信群机器人](http://cdn.itwake.com/Fnz3LqHVE7kwG6CLblrMUJ1tfEve.png)\n\n#### 将Webhook地址信息输入Jenkins中，即可完成最简单配置\n![将地址信息输入Jenkins中](http://cdn.itwake.com/15637076950124.jpg)\n\n## Pipeline Job参考配置\n```\npipeline {\n    agent any\n\n    stages {\n        stage('Hello') {\n            steps {\n                echo 'Hello World'\n            }\n        }\n    }\n    post{\n        success{\n            qyWechatNotification failNotify: true, mentionedId: '需要通知UserID', mentionedMobile: '需要通知的通知手机号码', webhookUrl: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx-xxxxxx-xxxxxx', moreInfo:'额外的信息'\n        }\n        failure{\n            qyWechatNotification failNotify: true, mentionedId: '需要通知UserID', mentionedMobile: '需要通知的通知手机号码', webhookUrl: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx-xxxxxx-xxxxxx', moreInfo:'额外的信息'\n        }\n    }\n}\n\n```\n\n## 运行效果\n\n#### 在构建开始的时候，群机器人会执行开始构建通知\n![构建开始通知](http://cdn.itwake.com/FqztU6i9mJd6NOdvdkR_H-E2bd7c.png)\n\n#### 构建成功后，群机器人会执行构建成功的通知\n![构建成功通知](http://cdn.itwake.com/Ft9p4--ek2U1sXXLeq4AteIK4EuK.png)\n\n#### 构建失败时，群机器人则会执行失败的通知\n![构建失败通知](http://cdn.itwake.com/Fr34HIw4g--6Mcln_WpY89wkXE0H.png)\n\n## 项目开发\n```\nmvn org.jenkins-ci.tools:maven-hpi-plugin:run\n```\n\n打开Jenkins地址\n```\nhttp://127.0.0.1:8080/jenkins\n```\n\n项目DEBUG\n````\nset MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n\n````\n\n项目打包\n````\nmvn package\n````\n\n## 更多支持\n\n需要更多的支持请通过下方地址进行留言\n\nhttps://itwake.blog.csdn.net/article/details/122043499","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fqy-wechat-notification-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fqy-wechat-notification-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fqy-wechat-notification-plugin/lists"}