25 lines
610 B
Groovy
25 lines
610 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Stop') {
|
|
steps {
|
|
sh 'sh /var/lib/jenkins/workspace/stop.sh'
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
sh 'mvn -B -DskipTests clean install'
|
|
}
|
|
}
|
|
stage('Start') {
|
|
steps {
|
|
// 解决Jenkins构建完毕之后会杀死所有衍生进程问题
|
|
withEnv(['JENKINS_NODE_COOKIE=dontkillme']) {
|
|
sh 'sh /var/lib/jenkins/workspace/start.sh'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|