fix(CI): 把环境变量引用放到step pod内部,因为kube场景下不允许顶层引用
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -11,8 +11,6 @@ trigger:
|
|||||||
environment:
|
environment:
|
||||||
NUXT_PORT: 3000
|
NUXT_PORT: 3000
|
||||||
HEALTH_CHECK_TIMEOUT: 30
|
HEALTH_CHECK_TIMEOUT: 30
|
||||||
CA_CRT:
|
|
||||||
from_secret: ca-crt
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: node_modules_cache
|
- name: node_modules_cache
|
||||||
@@ -27,11 +25,14 @@ steps:
|
|||||||
# 0️⃣ clone代码覆盖
|
# 0️⃣ clone代码覆盖
|
||||||
- name: clone
|
- name: clone
|
||||||
image: alpine/git:latest
|
image: alpine/git:latest
|
||||||
|
environment:
|
||||||
|
CA_CRT:
|
||||||
|
from_secret: ca-crt
|
||||||
commands:
|
commands:
|
||||||
- echo "$CA_CRT" > /usr/local/share/ca-certificates/ca.crt
|
- echo "$CA_CRT" > /usr/local/share/ca-certificates/ca.crt
|
||||||
- apk add --no-cache ca-certificates
|
- apk add --no-cache ca-certificates
|
||||||
- update-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:
|
volumeMounts:
|
||||||
- name: repo-volume
|
- name: repo-volume
|
||||||
mountPath: /drone/src
|
mountPath: /drone/src
|
||||||
@@ -89,6 +90,7 @@ steps:
|
|||||||
echo "✅ Nuxt 服务启动成功"
|
echo "✅ Nuxt 服务启动成功"
|
||||||
else
|
else
|
||||||
echo "❌ Nuxt 服务启动失败"
|
echo "❌ Nuxt 服务启动失败"
|
||||||
|
exit 1
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: repo-volume
|
- name: repo-volume
|
||||||
mountPath: /drone/src
|
mountPath: /drone/src
|
||||||
|
|||||||
Reference in New Issue
Block a user