|
|
@ -12,7 +12,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
|
|
|
- name: maven-build
|
|
|
|
- name: maven-build
|
|
|
|
path: /app/build # 将应用打包好的Jar和执行脚本挂载出来
|
|
|
|
path: /app/build # 将应用打包好的Jar和执行脚本挂载出来
|
|
|
|
commands: # 定义在Docker容器中执行的shell命令
|
|
|
|
commands: # 定义在Docker容器中执行的shell命令
|
|
|
|
- mvn -T 8 clean package -Dmaven.test.skip=true -pl ruoyi-admin -am # 应用打包命令
|
|
|
|
- mvn clean package -Dmaven.test.skip=true -pl ruoyi-admin -am # 应用打包命令
|
|
|
|
- cp ruoyi-admin/target/*.jar /app/build/
|
|
|
|
- cp ruoyi-admin/target/*.jar /app/build/
|
|
|
|
- cp ruoyi-admin/Dockerfile /app/build/Dockerfile
|
|
|
|
- cp ruoyi-admin/Dockerfile /app/build/Dockerfile
|
|
|
|
- cp run.sh /app/build/run.sh
|
|
|
|
- cp run.sh /app/build/run.sh
|
|
|
@ -38,7 +38,8 @@ volumes: # 定义流水线挂载目录,用于共享数据
|
|
|
|
- name: maven-cache
|
|
|
|
- name: maven-cache
|
|
|
|
host:
|
|
|
|
host:
|
|
|
|
path: /app/maven/cache
|
|
|
|
path: /app/maven/cache
|
|
|
|
# drone执行触发器
|
|
|
|
when:
|
|
|
|
trigger:
|
|
|
|
|
|
|
|
branch:
|
|
|
|
branch:
|
|
|
|
- test
|
|
|
|
- test
|
|
|
|
|
|
|
|
event:
|
|
|
|
|
|
|
|
- pull_request
|
|
|
|