我想以线程的形式向 Slack 发送 Jenkins 响应。可能吗..?
slackSend(频道:“构建”,消息:“开始构建”,thread_ts:如何?)
我想以线程的形式向 Slack 发送 Jenkins 响应。可能吗..?
slackSend(频道:“构建”,消息:“开始构建”,thread_ts:如何?)
根据本文,必须启用机器人用户模式。添加bot-user:true
到 slacksend 命令将完成此操作,但随后我得到了一个管道步骤
node {
def slackResponse = slackSend(channel: "cool-threads", message: "Here is the primary message")
slackSend(channel: slackResponse.threadId, message: "Thread reply #1")
slackSend(channel: slackResponse.threadId, message: "Thread reply #2")
}
回复广播到频道消息
node {
def slackResponse = slackSend(channel: "ci", message: "Started build")
slackSend(channel: slackResponse.threadId, message: "Build still in progress")
slackSend(
channel: slackResponse.threadId,
replyBroadcast: true,
message: "Build failed. Broadcast to channel for better visibility."
)
}
更多信息可以在官方文档 https://github.com/jenkinsci/slack-plugin中找到