Update vars/notifyLark.groovy

This commit is contained in:
2026-02-09 15:38:54 +08:00
parent 6d3f6853e6
commit 67d72cdc73

View File

@@ -3,6 +3,7 @@ def call(Map args = [:]) {
// ===== 参数 =====
def publishEnvs = args.publishEnvs ?: 'production'
def branchName = args.branchName ?: (env.BRANCH_NAME ?: 'unknown')
def webhookUrl = args.webhookUrl ?: env.XSH_FEISHU_WEBHOOK
// ===== Jenkins 内建上下文 =====
def buildStatus = currentBuild.currentResult ?: 'UNKNOWN'
@@ -50,7 +51,7 @@ def call(Map args = [:]) {
httpRequest(
httpMode: 'POST',
contentType: 'APPLICATION_JSON',
url: env.XSH_FEISHU_WEBHOOK,
url: webhookUrl,
requestBody: groovy.json.JsonOutput.toJson(payload),
validResponseCodes: '200:299'
)