wy 1 year ago
parent
commit
480a4a8b2a
1 changed files with 45 additions and 0 deletions
  1. 45 0
      .drone.yml

+ 45 - 0
.drone.yml

@@ -0,0 +1,45 @@
+kind: pipeline
+name: default
+
+steps:
+  - name: restore-cache
+    image: drillster/drone-volume-cache
+    volumes:
+    - name: cache
+      path: /cache
+    settings:
+      restore: true
+      mount:
+        - ./node_modules
+
+  - name: build
+    image: node:16.15
+    commands:
+      - npm config set registry https://registry.npm.taobao.org
+      - npm install
+      - npm run build:prod
+  
+  - name: rebuild-cache
+    image: drillster/drone-volume-cache
+    volumes:
+    - name: cache
+      path: /cache
+    settings:
+      rebuild: true
+      mount:
+        - ./node_modules
+
+  - name: docker-web
+    image: plugins/docker
+    settings:
+      tags:
+        - latest
+        - 1.1.${DRONE_BUILD_NUMBER}
+      registry: nas.fast-fun.cn:5000
+      insecure: true
+      repo: nas.fast-fun.cn:5000/zk/station-control-frontend
+
+volumes:
+  - name: cache
+    host:
+      path: /home/drone/cache