This commit is contained in:
17
.drone.yml
17
.drone.yml
@ -22,14 +22,16 @@ steps: # 定义管道的执行步骤
|
|||||||
|
|
||||||
- name: cache # 加载缓存
|
- name: cache # 加载缓存
|
||||||
image: drillster/drone-volume-cache
|
image: drillster/drone-volume-cache
|
||||||
restore: true
|
depends_on: [build-tags]
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/npm/cache:/cache
|
- name: cache
|
||||||
mount:
|
path: /cache
|
||||||
- ./node_modules
|
settings:
|
||||||
|
restore: true
|
||||||
|
mount:
|
||||||
|
- ./node_modules
|
||||||
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
pull: if-not-exists # 如果镜像不存在则拉取,免去每次都要重新下载
|
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
depends_on: [cache]
|
depends_on: [cache]
|
||||||
settings:
|
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 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}')
|
- docker rmi $(docker images | grep "none" | awk '{print $3}')
|
||||||
- echo ==-----==部署成功==-----==
|
- echo ==-----==部署成功==-----==
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: /tmp/npm/cache
|
Reference in New Issue
Block a user