123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- kind: pipeline
- type: docker
- name: dev
- node:
- mode: local_test
- steps:
- # - name: yarn-install
- # image: gplane/pnpm:node20
- # volumes:
- # - name: modules-cache
- # path: /drone/src/node_modules # 下载依赖的目录挂载出来,防止重复下载
- # commands:
- # # - yarn build
- # # - pnpm config set registry https://registry.npmmirror.com/
- # # - pnpm install
- # # - pnpm run build
- # - pnpm serve
- - name: build
- image: docker:20.10.7
- # depends_on: [yarn-install]
- volumes:
- - name: docker
- path: /var/run/docker.sock
- - name: modules-cache
- path: /drone/src/node_modules # 下载依赖的目录挂载出来,防止重复下载
- environment:
- IMAGE: registry.yingcaibx.com/tl/admin_web:latest
- commands:
- # 清理 docker 服务中不再使用的镜像、挂载、网络等资源
- - docker system prune --force --volumes || true
- - docker build -f ./Dockerfile-Dev -t $IMAGE ./
- - name: run
- image: docker/compose:1.29.2
- depends_on: [build]
- volumes:
- - name: docker
- path: /var/run/docker.sock
- commands:
- - docker-compose -f docker-compose-dev.yml up -d
- trigger:
- branch:
- - dev
- event:
- - push
- volumes:
- - name: docker
- host:
- path: /var/run/docker.sock
- - name: modules-cache
- host:
- path: /data/cache/tl/new1_web
- ---
- kind: pipeline
- type: docker
- name: pre
- node:
- mode: local_pre
- steps:
- # - name: yarn-install
- # image: gplane/pnpm:node20
- # volumes:
- # - name: modules-cache
- # path: /drone/src/node_modules # 下载依赖的目录挂载出来,防止重复下载
- # commands:
- # - pnpm config set registry https://registry.npmmirror.com/
- # - pnpm install
- # - pnpm run build
- - name: build
- image: docker:20.10.7
- # depends_on: [yarn-install]
- volumes:
- - name: docker
- path: /var/run/docker.sock
- - name: modules-cache
- path: /drone/src/node_modules # 下载依赖的目录挂载出来,防止重复下载
- environment:
- IMAGE: registry.yingcaibx.com/tl/admin_web:latest
- commands:
- # 清理 docker 服务中不再使用的镜像、挂载、网络等资源
- - docker system prune --force --volumes || true
- - docker build -f ./Dockerfile-Pre -t $IMAGE ./
- - name: run
- image: docker/compose:1.29.2
- depends_on: [build]
- volumes:
- - name: docker
- path: /var/run/docker.sock
- commands:
- - docker-compose -f docker-compose-pre.yml up -d
- trigger:
- branch:
- - pre
- event:
- - push
- volumes:
- - name: docker
- host:
- path: /var/run/docker.sock
- - name: modules-cache
- host:
- path: /data/cache/tl/web_new
|