Commit 0ec47963 authored by lijingang's avatar lijingang

feat: 新增脚本

parent 3f4e3665
...@@ -44,6 +44,7 @@ pipeline { ...@@ -44,6 +44,7 @@ pipeline {
description: '输入 agent 节点 (默认:)' description: '输入 agent 节点 (默认:)'
) )
string(name: 'NODE_WORKING_DIR', defaultValue: '.', description: 'Node.js 脚本执行的工作目录') string(name: 'NODE_WORKING_DIR', defaultValue: '.', description: 'Node.js 脚本执行的工作目录')
string(name: 'BRANCH_NAME', defaultValue: 'main', description: '要构建的分支名称')
} }
agent { agent {
...@@ -123,7 +124,7 @@ pipeline { ...@@ -123,7 +124,7 @@ pipeline {
actionType = "PRE_RELEASE" actionType = "PRE_RELEASE"
} }
// --- 优先级 4: 常规核心分支 --- // --- 优先级 4: 常规核心分支 ---
else if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'feat-report-zxh-bghd') { else if (env.BRANCH_NAME == null || env.BRANCH_NAME == 'feat-report-zxh-bghd' ) {
actionType = "REGULAR_BUILD" actionType = "REGULAR_BUILD"
} }
...@@ -145,6 +146,9 @@ pipeline { ...@@ -145,6 +146,9 @@ pipeline {
if (params.avg) { if (params.avg) {
buildParams += " --avg=${params.avg}" buildParams += " --avg=${params.avg}"
} }
if (params.BRANCH_NAME) {
buildParams += " --branch=${params.BRANCH_NAME}"
}
// 执行你的 Node.js 构建脚本 // 执行你的 Node.js 构建脚本
// 注意:${params.xxx} 建议加上 trim() 防止空格报错 // 注意:${params.xxx} 建议加上 trim() 防止空格报错
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment