39 lines
1010 B
Groovy
39 lines
1010 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
stages {
|
|
stage('清理工作空间') {
|
|
steps {
|
|
deleteDir()
|
|
}
|
|
}
|
|
stage('拉取代码') {
|
|
steps {
|
|
git url:'http://118.25.129.153:3000/zhihui/rongshuo.git',branch:'main'
|
|
}
|
|
}
|
|
stage('使用MAVNE构建') {
|
|
steps {
|
|
withMaven(maven: 'Maven3') {
|
|
sh 'mvn clean package -DskipTests'
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('复制Jar包') {
|
|
steps {
|
|
sh 'cp target/rongshuo.jar /app/rongshuo.jar' // ✅ 添加 sh
|
|
}
|
|
}
|
|
|
|
// stage('Docker Compose 发布 root') {
|
|
// steps {
|
|
// sh '''
|
|
// cd /mydata/docker/rongshuo
|
|
// docker compose down
|
|
// docker compose up -d
|
|
// '''
|
|
// }
|
|
// }
|
|
}
|
|
} |