Files
rongshuo/Jenkinsfile
T

31 lines
756 B
Groovy
Raw Normal View History

2026-06-17 21:27:48 +08:00
pipeline {
agent any
stages {
stage('使用MAVNE构建') {
steps {
2026-06-17 21:59:47 +08:00
withMaven(maven: 'Maven3') {
2026-06-17 21:46:45 +08:00
sh 'mvn clean package -DskipTests'
}
2026-06-17 21:27:48 +08:00
}
}
stage('复制Jar包') {
steps {
2026-06-18 09:47:53 +08:00
cp target/rongshuo.jar /mydata/docker/rongshuo/rongshuo.jar
2026-06-17 21:27:48 +08:00
}
}
2026-06-18 09:30:18 +08:00
stage('Docker Compose 发布本机') {
2026-06-17 21:27:48 +08:00
steps {
2026-06-18 09:47:53 +08:00
sh '''
# 通过挂载的 docker.sock 操作宿主机 Docker
cd /mydata/docker/rongshuo
docker compose down
docker compose up -d
'''
2026-06-17 21:27:48 +08:00
}
}
}
}