Commit e08053d2 authored by Gerry Gunzenhauser's avatar Gerry Gunzenhauser

Allow usage of custom yaml template

parent 251b9505
Pipeline #2228 passed with stage
in 15 seconds
......@@ -40,7 +40,11 @@ metadata:
name: $KUBE_NAMESPACE
EOF
cat <<EOF | kubectl apply -n $KUBE_NAMESPACE -f -
if [ -e "${DEPLOYMENT_YML_FILE:-deployment.yml}" ]; then
eval "kubectl apply -n $KUBE_NAMESPACE -f - <<EOF\n$(cat ${DEPLOYMENT_YML_FILE:-deployment.yml})\nEOF"
else
cat <<EOF | kubectl apply -n $KUBE_NAMESPACE -f -
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
......@@ -126,6 +130,7 @@ spec:
serviceName: $CI_ENVIRONMENT_SLUG
servicePort: $CONTAINER_HTTP_PORT
EOF
fi
echo "Waiting for deployment..."
kubectl rollout status -n "$KUBE_NAMESPACE" -w "deployment/$CI_ENVIRONMENT_SLUG"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment