22 lines
614 B
Bash
22 lines
614 B
Bash
if [ -z "$deployment" ]; then
|
|
echo "deployment is not set"
|
|
exit 1
|
|
fi
|
|
if [ -z "$namespace" ]; then
|
|
echo "namespace is not set"
|
|
exit 1
|
|
fi
|
|
if [ -z "$image_tag" ]; then
|
|
echo "image_tag is not set"
|
|
exit 1
|
|
fi
|
|
if [ "$deployment" = "dev" ] || [ "$deployment" = "test" ] ; then
|
|
export ingress_host=finance-dbt-doc.${deployment}.mujiannan.com
|
|
else
|
|
export ingress_host=finance-dbt-doc.mujiannan.com
|
|
fi
|
|
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 - |