From 8dea27d14a81d3657a6094648c02ef40013ace23 Mon Sep 17 00:00:00 2001 From: Timothy Yin Date: Mon, 9 Feb 2026 14:08:10 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=9B=B4=E6=96=B0=20Jenkinsfile=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E7=BD=B2=E5=8F=82=E6=95=B0=E5=92=8C?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 236eb8e..3b13911 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 ''' -- 2.49.1