This commit is contained in:
Yvan 2026-09-05 09:38:02 +08:00
parent c968c2f1f0
commit 451c8e2abc
1 changed files with 3 additions and 1 deletions

4
deploy/Jenkinsfile vendored
View File

@ -226,7 +226,9 @@ pipeline {
esac
RENDERED_MANIFEST="$TMP_DIR/manifest.yaml"
envsubst "$K8S_RENDER_VARS" < deploy/k8s/kra.yaml > "$RENDERED_MANIFEST"
if grep -nE '\$\{[A-Z_][A-Z0-9_]*\}' "$RENDERED_MANIFEST"; then
# Groovy 三单引号字符串内反斜杠仍是转义前缀:
# 本行正则里的反斜杠序列必须双写shell 才能收到 grep -E 需要的单反斜杠模式。
if grep -nE '\\$\\{[A-Z_][A-Z0-9_]*\\}' "$RENDERED_MANIFEST"; then
echo 'Rendered Kubernetes manifest contains unresolved template variables' >&2
exit 1
fi