WIP: master #5

Closed
bob wants to merge 6 commits from master into test

@ -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

@ -6,6 +6,6 @@ ARG SPRING_PROFILE
ENV JAVA_OPTS "${JAVA_OPTS} ${CUSTOM_OPTS}" ENV JAVA_OPTS "${JAVA_OPTS} ${CUSTOM_OPTS}"
COPY target/*.jar /javarun COPY *.jar /javarun
CMD ["bash","-c","java ${JAVA_OPTS} -Dspring.profiles.active=${SPRING_PROFILE} -jar /javarun/*.jar"] CMD ["bash","-c","java ${JAVA_OPTS} -Dspring.profiles.active=${SPRING_PROFILE} -jar /javarun/*.jar"]

@ -17,7 +17,7 @@ public class RuoYiApplication
public static void main(String[] args) public static void main(String[] args)
{ {
// System.setProperty("spring.devtools.restart.enabled", "false"); // System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
log.info("=========================cd auto deploy success========="); log.info("=========================cd auto deploy success=========");
SpringApplication.run(RuoYiApplication.class, args);
} }
} }

Loading…
Cancel
Save