Browse Source

drone config

fanxp 1 month ago
parent
commit
3bd3f96675
1 changed files with 8 additions and 9 deletions
  1. 8 9
      .drone.yml

+ 8 - 9
.drone.yml

@@ -15,17 +15,17 @@ steps:
 #      - name: skywalking-cache
 #        path: /root/skywalking-agent-java
 
-#  - name: maven
-#    image: maven:3.6.3-jdk-11
-#    volumes:
-#      - name: maven-cache
-#        path: /root/.m2 # 将maven下载依赖的目录挂载出来,防止重复下载
-#    commands:
-#      - mvn -Dmaven.test.skip=true -P dev clean package
+  - name: maven
+    image: maven:3.6.3-jdk-11
+    volumes:
+      - name: maven-cache
+        path: /root/.m2 # 将maven下载依赖的目录挂载出来,防止重复下载
+    commands:
+      - mvn -Dmaven.test.skip=true -P dev clean package
 
   - name: build
     image: docker:20.10.7
-#    depends_on: [maven]
+    depends_on: [maven]
     volumes:
       - name: docker
         path: /var/run/docker.sock
@@ -34,7 +34,6 @@ steps:
     environment:
       IMAGE: registry.yingcaibx.com/tl/api:latest
     commands:
-      - sleep 100000
       # 清理 docker 服务中不再使用的镜像、挂载、网络等资源
       - docker system prune --force --volumes || true
       - docker build -f ./Dockerfile -t $IMAGE ./