瀏覽代碼

添加ws库

TitanWong 2 年之前
父節點
當前提交
ca65378fb4
共有 1 個文件被更改,包括 32 次插入1 次删除
  1. 32 1
      .drone.yml

+ 32 - 1
.drone.yml

@@ -2,6 +2,32 @@ 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.14
+    commands:
+      - npm config set registry https://registry.npm.taobao.org
+      - npm install ws
+  
+  - name: rebuild-cache
+    image: drillster/drone-volume-cache
+    volumes:
+    - name: cache
+      path: /cache
+    settings:
+      rebuild: true
+      mount:
+        - ./node_modules
+
   - name: video-relay
     image: plugins/docker
     settings:
@@ -10,4 +36,9 @@ steps:
         - 1.0.${DRONE_BUILD_NUMBER}
       registry: nas.fast-fun.cn:5000
       insecure: true
-      repo: nas.fast-fun.cn:5000/zk/station-control-video-relay
+      repo: nas.fast-fun.cn:5000/zk/station-control-video-relay
+
+volumes:
+  - name: cache
+    host:
+      path: /home/drone/cache