fix(CI): 把环境变量引用放到step pod内部,因为kube场景下不允许顶层引用
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tobegold574
2025-11-03 13:12:30 +08:00
parent 01250c0741
commit 6134b720c4

View File

@@ -11,8 +11,6 @@ trigger:
environment:
NUXT_PORT: 3000
HEALTH_CHECK_TIMEOUT: 30
CA_CRT:
from_secret: ca-crt
volumes:
- name: node_modules_cache
@@ -27,11 +25,14 @@ steps:
# 0⃣ clone代码覆盖
- name: clone
image: alpine/git:latest
environment:
CA_CRT:
from_secret: ca-crt
commands:
- echo "$CA_CRT" > /usr/local/share/ca-certificates/ca.crt
- apk add --no-cache ca-certificates
- update-ca-certificates
- git clone https://gitea.local.knowai/tobegold574/knowai.git /drone/src
- git clone https://gitea.local.knowai.tobegold574/knowai.git /drone/src
volumeMounts:
- name: repo-volume
mountPath: /drone/src
@@ -89,6 +90,7 @@ steps:
echo "✅ Nuxt 服务启动成功"
else
echo "❌ Nuxt 服务启动失败"
exit 1
volumeMounts:
- name: repo-volume
mountPath: /drone/src