From c7347dc7069b71901245d532d72eefceb1e6a22b Mon Sep 17 00:00:00 2001 From: YDKD <1606354057@qq.com> Date: Tue, 12 Apr 2022 10:07:33 +0800 Subject: [PATCH] build(jenkins): modify jenkins file --- Jenkinsfile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3a45157..1294cec 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,6 +17,25 @@ pipeline { } stages { + stage('stop container') { + + when { + anyOf { + branch 'dev' + } + } + agent { + docker { + image 'node:14.18.0' + reuseNode true + } + } + + steps { + sh './jenkins/script/stop.sh' + } + } + stage('pre-build') { // 自定义步骤 pre-build when { @@ -127,7 +146,6 @@ pipeline { } steps { - sh 'restart' sh './jenkins/script/restart.sh' } }