ci: 更新 Jenkinsfile,添加部署参数和构建条件
Some checks are pending
aigc/aigc_next_multi/pipeline/pr-main Build queued...
aigc/aigc_next_multi/pipeline/head This commit looks good

This commit was merged in pull request #3.
This commit is contained in:
2026-02-09 14:08:10 +08:00
parent 96ddb09ea3
commit 8dea27d14a

18
Jenkinsfile vendored
View File

@@ -5,6 +5,19 @@ pipeline {
timestamps()
}
parameters {
choice(
name: 'XSH_DEPLOY_TARGET',
choices: ['main'],
description: 'main眩生花线上版本'
)
booleanParam(
name: 'XSH_DEPLOY_TO_PRODUCTION',
defaultValue: true,
description: '是否自动部署到线上环境(否则只构建产物)\n* 仅在 main 分支生效'
)
}
tools {
nodejs 'NodeJS 22.22'
}
@@ -32,7 +45,10 @@ pipeline {
stage('Build') {
when {
expression { currentBuild.currentResult == 'SUCCESS' }
allOf {
expression { currentBuild.currentResult == 'SUCCESS' }
expression { env.TAG_NAME != null }
}
}
steps {
sh '''