// 飞书消息推送, 向指定的飞书群发送消息 def call (Map config = [:]) { def webhook = config.webhook def title = config.title def context = config.context def rawBody = libraryResource 'notify/feishu/post.json' def binding = [ title: "${title}", message: "${context}" ] def render = renderTemplate(rawBody,binding) sh """ curl -X POST -H \"Content-Type: application/json\" --data \"${render}\" $webhook """ }