From f679b9b7d1af26f48f8fa6387d838caf1b4f2717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=B7=E6=88=90=E4=BC=9F?= Date: Thu, 20 Jun 2024 09:28:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=89=88=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 61bb5844..ded0cc17 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ pipeline { parameters { - choice choices: ['全部', '前端', '后端'], name: 'build_type' + choice choices: ['all', 'ui', 'service'], description: 'all - 前端和后端 ; ui - 仅发版前端 ; service - 仅发版后端', name: 'publish_type' } agent any stages { @@ -10,6 +10,9 @@ pipeline { } } stage('编译UI') { + when { + expression { params.publish_type == "ui" && params.publish_type == "all" } + } steps { nodejs(cacheLocationStrategy: workspace(), configId: '8e356590-2fee-4f1f-b0e9-5cea43299887', nodeJSInstallationName: 'nodejs202122') { dir("$WORKSPACE/ui/dasadmin") { @@ -20,6 +23,9 @@ pipeline { } } stage('编译后端') { + when { + expression { params.publish_type == "service" && params.publish_type == "all" } + } steps { withMaven(globalMavenSettingsConfig: 'bab2e7fd-587c-4284-9bd8-6b97dfeb2fab', jdk: 'jdk17', maven: 'maven396') { dir("$WORKSPACE/das") {