diff --git a/vars/notifyLark.groovy b/vars/notifyLark.groovy index e61de95..2611bc7 100644 --- a/vars/notifyLark.groovy +++ b/vars/notifyLark.groovy @@ -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' )