Update vars/notifyLark.groovy
This commit is contained in:
@@ -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'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user