From 2e34877f32a399c18c1661e0fc6c9585cc97f72c Mon Sep 17 00:00:00 2001 From: bpa <1370533105@qq.com> Date: Mon, 25 Apr 2022 05:30:22 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'Jenkinsfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2544773..5acbe30 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,9 +26,9 @@ pipeline{ ) choice( - description: '分支名', - name: 'branchName', - choices: ['master'] + description: '是否下载包', + name: 'isDownloadPackage', + choices: ['是','否'] ) string( @@ -80,7 +80,11 @@ pipeline{ nodejs("nodejs") { } + if(params.isDownloadPackage=='是') + { sh "npm install --unsafe-perm=true --allow-root" + } + sh "rm -rf ./dist/*" sh "npm run build" sh "docker build -t 10.2.1.24:10242/bpa/kitchenweb:${build_tag} ."