2023-05-11 10:44:42 +08:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2023-05-11 19:11:40 +08:00
|
|
|
stages {
|
|
|
|
stage('Stop') {
|
2023-05-11 10:44:42 +08:00
|
|
|
steps {
|
2023-05-12 08:53:30 +08:00
|
|
|
sh 'sh /var/lib/jenkins/workspace/stop.sh'
|
2023-05-11 10:44:42 +08:00
|
|
|
}
|
|
|
|
}
|
2023-05-11 19:11:40 +08:00
|
|
|
stage('Build') {
|
|
|
|
steps {
|
|
|
|
sh 'mvn -B -DskipTests clean install'
|
|
|
|
}
|
|
|
|
}
|
2023-05-12 08:44:14 +08:00
|
|
|
stage('Start') {
|
2023-05-11 19:11:40 +08:00
|
|
|
steps {
|
2023-05-12 09:38:28 +08:00
|
|
|
// 解决Jenkins构建完毕之后会杀死所有衍生进程问题
|
|
|
|
withEnv(['JENKINS_NODE_COOKIE=dontkillme']) {
|
2023-05-12 09:18:37 +08:00
|
|
|
sh 'sh /var/lib/jenkins/workspace/start.sh'
|
2023-05-12 09:38:28 +08:00
|
|
|
}
|
2023-05-11 19:11:40 +08:00
|
|
|
}
|
|
|
|
}
|
2023-05-11 10:44:42 +08:00
|
|
|
}
|
|
|
|
}
|
2023-05-11 19:11:40 +08:00
|
|
|
|