|
@@ -64,28 +64,30 @@ 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: 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]
|
|
|
+ # 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 -t $IMAGE ./
|
|
|
+ - docker build -f ./Dockerfile-Dev -t $IMAGE ./
|
|
|
|
|
|
- name: run
|
|
|
image: docker/compose
|