Skip to content

Commit

Permalink
build(jenkins): modify jenkins file
Browse files Browse the repository at this point in the history
  • Loading branch information
YDKD committed Apr 12, 2022
1 parent 5fa3706 commit c7347dc
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -127,7 +146,6 @@ pipeline {
}

steps {
sh 'restart'
sh './jenkins/script/restart.sh'
}
}
Expand Down

0 comments on commit c7347dc

Please sign in to comment.