2

钉钉通知

 2 years ago
source link: https://linuxsuren.github.io/blog/devops/jenkins/jenkins-plugin/dingding-notifications/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
钉钉通知 - SuRenPi

此页面上的内容

支持的特性包括:

  • 发送任务状态
  • 发送文本类型的消息

系统管理》插件管理》可选插件 中搜索 dingding-notifications 并安装。

在钉钉中新建一个群,然后在群里添加一个机器人,选择自定义类型。

在 Jenkins 中新建自由风格任务

构建后操作添加钉钉通知器配置 。在表单中需要把 Jenkins 的 URL 设置正确——必须让钉钉可以访问到。Token 是刚才在钉钉机器人里的 webhook 里。

上面的方式,只能发送构建状态,如果要发送自定义消息的话,需要添加 Sending Message To Ding Talk。在高级选项里可以设置。

你也可以在流水线(Jenkinsfile)中使用下面是 DSL 来实现发送消息:

dingTalk accessToken: 'token', imageUrl: 'imageUrl', jenkinsUrl: 'http://localhost/jenkins', message: 'messages', notifyPeople: '18211192837'

类型编号描述 Improvement JENKINS-63008 Triggers need to upgrade Bug JENKINS-55441 Lack of the Chinese Localization Bug JENKINS-55440 Typo jenkins


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK