mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-07 01:46:46 +08:00
68 lines
1.4 KiB
YAML
68 lines
1.4 KiB
YAML
kind: pipeline
|
|
name: fe-str
|
|
|
|
steps:
|
|
- name: restore-cache
|
|
image: drillster/drone-volume-cache
|
|
settings:
|
|
restore: true
|
|
mount:
|
|
- ./.npm-cache
|
|
- ./node_modules
|
|
volumes:
|
|
- name: cache
|
|
path: /cache
|
|
|
|
- name: npm-install
|
|
image: node:16.13.1-alpine
|
|
commands:
|
|
- npm config set cache ./.npm-cache --global
|
|
- npm config set registry http://registry.npm.taobao.org/
|
|
- npm install && npm run build
|
|
|
|
- name: rebuild-cache
|
|
image: drillster/drone-volume-cache
|
|
settings:
|
|
rebuild: true
|
|
mount:
|
|
- ./.npm-cache
|
|
- ./node_modules
|
|
volumes:
|
|
- name: cache
|
|
path: /cache
|
|
|
|
- name: build-fe-stu
|
|
image: plugins/docker
|
|
privileged: true
|
|
volumes:
|
|
- name: registry-auth
|
|
path: /root/.docker
|
|
- name: dockersock
|
|
path: /var/run/docker.sock
|
|
settings:
|
|
registry: swr.cn-south-1.myhuaweicloud.com
|
|
repo: swr.cn-south-1.myhuaweicloud.com/yp/fe-stu
|
|
tags: latest
|
|
|
|
- name: release
|
|
image: docker:dind
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run/docker.sock
|
|
- name: registry-auth
|
|
path: /root/.docker
|
|
commands:
|
|
- docker stack deploy -c docker-compose.yml fe-stu --with-registry-auth
|
|
|
|
|
|
volumes:
|
|
- name: cache
|
|
host:
|
|
path: /tmp/cache
|
|
- name: dockersock
|
|
host:
|
|
path: /var/run/docker.sock
|
|
- name: registry-auth
|
|
host:
|
|
path: /root/.docker
|