deploy/stop
#!/bin/bash
set -euo pipefail
. "$(dirname "${0}")/utils.sh"
if has_namespace $APP_NAMESPACE_NAME; then
get_logs
fi
set_namespace default
if [[ $PLATFORM == openshift ]]; then
$cli_with_timeout login -u $OPENSHIFT_USERNAME -p $OPENSHIFT_PASSWORD
fi
if has_namespace $APP_NAMESPACE_NAME; then
$cli_with_timeout delete namespace $APP_NAMESPACE_NAME
printf "Waiting for $APP_NAMESPACE_NAME namespace deletion to complete"
while : ; do
printf "."
if has_namespace "$APP_NAMESPACE_NAME"; then
sleep 5
else
break
fi
done
echo ""
fi
echo "App environment purged."