ci(drone): 更新构建配置以支持 Maven 构建

- 新增 maven-build 步骤,使用 Maven 进行项目构建- 更新 build-jar 步骤中的 JAR 文件路径
-优化构建流程,提高构建效率
This commit is contained in:
lujianxin 2025-06-23 18:00:12 +08:00
parent 9389fee8bd
commit e720e17d76
1 changed files with 12 additions and 2 deletions

View File

@ -4,6 +4,16 @@ name: ${serverName} # 服务名成可与jar包名保持一致
steps: steps:
- name: maven-build
image: maven:3.8.5-openjdk-17
volumes:
- name: maven-cache
path: /root/.m2
- name: build-output
path: /home/app/build
commands:
- mvn clean package -DskipTests=true -pl yudao-gateway,ruoyi-modules-system,yudao-module-infra -am
- name: build-jar - name: build-jar
image: alpine image: alpine
volumes: volumes:
@ -11,8 +21,8 @@ steps:
path: /home/app/build path: /home/app/build
commands: commands:
- mkdir -p /home/app/build/{gateway,system,infra} - mkdir -p /home/app/build/{gateway,system,infra}
- cp ruoyi-gateway/target/*.jar /home/app/build/gateway/app.jar - cp yudao-gateway/target/*.jar /home/app/build/gateway/app.jar
- cp ruoyi-modules-system/target/*.jar /home/app/build/system/app.jar - cp yudao-modules-system/target/*.jar /home/app/build/system/app.jar
- cp yudao-module-infra/target/*.jar /home/app/build/file/app.jar - cp yudao-module-infra/target/*.jar /home/app/build/file/app.jar
- cp Dockerfile /home/app/build/ - cp Dockerfile /home/app/build/