fix: Drone 恢复默认 clone(depth=1),去掉慢速 apt 安装 git
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
17f3948dc7
commit
5651bcd85e
1 file changed
+5
-19
+5
-19
@@ -1,8 +1,6 @@
|
||||
# zkxw:仅编译打包,不自动部署测试环境
|
||||
# 触发:push / tag
|
||||
# 产物:各 step 日志打印 artifacts sha256
|
||||
#
|
||||
# 说明:关闭默认 clone(drone/git 难拉);分步构建以降低 3.6G 机器峰值内存。
|
||||
# 机器内存约 3.6G:分步构建 + 限制 Node 堆
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
@@ -11,28 +9,16 @@ name: build-package
|
||||
concurrency:
|
||||
limit: 1
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: node:20-bookworm
|
||||
environment:
|
||||
GOGS_HTTP: http://101.35.245.122:3000
|
||||
commands:
|
||||
- set -eu
|
||||
- apt-get update -qq && apt-get install -y -qq git ca-certificates >/dev/null
|
||||
- |
|
||||
BRANCH="${DRONE_SOURCE_BRANCH:-${DRONE_BRANCH:-master}}"
|
||||
echo "[CI] clone $GOGS_HTTP/wuzilong/zkxw.git branch=$BRANCH commit=${DRONE_COMMIT}"
|
||||
git clone --depth 50 --branch "$BRANCH" "$GOGS_HTTP/wuzilong/zkxw.git" .
|
||||
git checkout -q "$DRONE_COMMIT"
|
||||
# 使用本机已预拉的 drone/git(默认 clone 镜像)
|
||||
clone:
|
||||
depth: 1
|
||||
|
||||
steps:
|
||||
- name: build-web-admin
|
||||
image: node:20-bookworm
|
||||
environment:
|
||||
|
||||
Reference in new issue
Block a user