1-27同步
This commit is contained in:
@@ -117,6 +117,9 @@ pipeline {
|
||||
def formattedBranch = branchName.replace('/', '-').replace('_', '-') // 替换分支名中的/和_为-
|
||||
// 构建时间(格式:202510181215,年-月-日-时-分,无分隔符)
|
||||
def buildTime = sh(script: 'date +%Y%m%d%H%M', returnStdout: true).trim()
|
||||
// 当前时间(格式:YYYY-MM-DD HH:MM:SS)
|
||||
env.currentTime = sh(script: 'date "+%Y-%m-%d %H:%M:%S"', returnStdout: true).trim()
|
||||
|
||||
def defaultTag = "v${buildNumber}_${formattedBranch}_${GIT_COMMIT_SHORT}_${buildTime}"
|
||||
|
||||
def customTag = params.CUSTOM_TAG?.trim()
|
||||
@@ -273,7 +276,7 @@ pipeline {
|
||||
lark (
|
||||
robot: "${LARK_ROBOT}",
|
||||
type: "CARD",
|
||||
title: "lessie-go-api镜像构建成功",
|
||||
title: "${IMAGE_NAME}镜像构建成功",
|
||||
text: [
|
||||
"📅 **构建时间**: ${currentTime}",
|
||||
"📋 **任务名称**: [${JOB_NAME}](${JOB_URL})",
|
||||
|
||||
Reference in New Issue
Block a user