jek 1 month ago
parent
commit
d38da05501
1 changed files with 14 additions and 11 deletions
  1. 14 11
      .drone.yml

+ 14 - 11
.drone.yml

@@ -3,7 +3,7 @@ name: default
 
 steps:
   - name: restore-cache
-    image: drillster/drone-volume-cache
+    image: rpi.it5000.com:5000/drillster/drone-volume-cache
     settings:
       restore: true
       mount:
@@ -13,12 +13,12 @@ steps:
         path: /cache
 
   - name: mvn-package
-    image: maven:3.8.4-jdk-8
+    image: rpi.it5000.com:5000/jaikuai/npm-mvn:rpi
     commands:
       - mvn clean package -Dmaven.test.skip=true -Dmaven.repo.local=./repository -s ./setting.xml
 
   - name: rebuild-cache
-    image: drillster/drone-volume-cache
+    image: rpi.it5000.com:5000/drillster/drone-volume-cache
     settings:
       rebuild: true
       mount:
@@ -28,17 +28,20 @@ steps:
         path: /cache
 
   - name: docker-build
-    image: plugins/docker
-    settings:
-      tags:
-        - latest
-        - 1.0.${DRONE_BUILD_NUMBER}
-      registry: nas.fast-fun.cn:5000
-      insecure: true
-      repo: nas.fast-fun.cn:5000/zk/station-control-tts
+    image: rpi.it5000.com:5000/docker:27
+    privileged: true
+    volumes:
+      - name: docker
+        path: /var/run/docker.sock
+    commands:
+      - docker build -t nas.fast-fun.cn:5000/zk/station-control-tts:1.0.${DRONE_BUILD_NUMBER} -f Dockerfile .
+      - docker push nas.fast-fun.cn:5000/zk/station-control-tts:1.0.${DRONE_BUILD_NUMBER}
 
 volumes:
   - name: cache
     host:
       path: /home/drone/cache
+  - name: docker
+    host:
+      path: /var/run/docker.sock