use sed instead of envsubst
All checks were successful
MJN/finance-dbt/pipeline/head This commit looks good

This commit is contained in:
沈楠 2024-04-12 18:51:43 +08:00
parent d8963d0192
commit fed01c723e

View File

@ -11,8 +11,12 @@ if [ -z "$image_tag" ]; then
exit 1 exit 1
fi fi
if [ "$deployment" = "dev" ] || [ "$deployment" = "test" ] ; then if [ "$deployment" = "dev" ] || [ "$deployment" = "test" ] ; then
ingress_host=finance-dbt-doc.${deployment}.mujiannan.com export ingress_host=finance-dbt-doc.${deployment}.mujiannan.com
else else
ingress_host=finance-dbt-doc.mujiannan.com export ingress_host=finance-dbt-doc.mujiannan.com
fi fi
envsubst < Deploy.yml | kubectl apply -f - sed -e "s/\${namespace}/${namespace}/g" Deploy.yml \
-e "s/\${deployment}/${deployment}/g" \
-e "s/\${image_tag}/${image_tag}/g" \
-e "s/\${ingress_host}/${ingress_host}/g" \
| kubectl apply -f -