diff --git a/.drone.yml b/.drone.yml index 6cc0c93..957556a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,14 +22,16 @@ steps: # 定义管道的执行步骤 - name: cache # 加载缓存 image: drillster/drone-volume-cache - restore: true + depends_on: [build-tags] volumes: - - /tmp/npm/cache:/cache - mount: - - ./node_modules + - name: cache + path: /cache + settings: + restore: true + mount: + - ./node_modules - name: build-image - pull: if-not-exists # 如果镜像不存在则拉取,免去每次都要重新下载 image: plugins/docker depends_on: [cache] settings: @@ -76,3 +78,8 @@ steps: - docker run -d -p 16808:8080 --name=mol-robot_${DRONE_BUILD_NUMBER} --env-file /mnt/data/opt/mol-robot/.env git.liliyamol.cn:8081/mol/mol-robot:latest - docker rmi $(docker images | grep "none" | awk '{print $3}') - echo ==-----==部署成功==-----== + +volumes: + - name: cache + host: + path: /tmp/npm/cache \ No newline at end of file