|
@@ -64,28 +64,30 @@ node:
|
|
mode: local_pre
|
|
mode: local_pre
|
|
|
|
|
|
steps:
|
|
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: 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
|
|
- name: build
|
|
image: docker:20.10.7
|
|
image: docker:20.10.7
|
|
- depends_on: [yarn-install]
|
|
|
|
|
|
+ # depends_on: [yarn-install]
|
|
volumes:
|
|
volumes:
|
|
- name: docker
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
path: /var/run/docker.sock
|
|
|
|
+ - name: modules-cache
|
|
|
|
+ path: /drone/src/node_modules # 下载依赖的目录挂载出来,防止重复下载
|
|
environment:
|
|
environment:
|
|
IMAGE: registry.yingcaibx.com/tl/admin_web:latest
|
|
IMAGE: registry.yingcaibx.com/tl/admin_web:latest
|
|
commands:
|
|
commands:
|
|
# 清理 docker 服务中不再使用的镜像、挂载、网络等资源
|
|
# 清理 docker 服务中不再使用的镜像、挂载、网络等资源
|
|
- docker system prune --force --volumes || true
|
|
- docker system prune --force --volumes || true
|
|
- - docker build -f ./Dockerfile -t $IMAGE ./
|
|
|
|
|
|
+ - docker build -f ./Dockerfile-Dev -t $IMAGE ./
|
|
|
|
|
|
- name: run
|
|
- name: run
|
|
image: docker/compose
|
|
image: docker/compose
|