2023-10-16 19:57:29 +02:00
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
|
|
|
|
. "$DIR/prelude.sh"
|
|
|
|
|
2024-08-07 23:01:42 +02:00
|
|
|
set -o errexit
|
|
|
|
|
2024-03-18 19:17:01 +01:00
|
|
|
# Only run this script for the external_auth_oidc_azure task.
|
|
|
|
if [ "${task_name}" != "external_auth_oidc_azure" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Cleaning up Azure OIDC test artifacts"
|
|
|
|
|
2023-10-16 19:57:29 +02:00
|
|
|
cd src
|
|
|
|
|
2024-03-18 19:17:01 +01:00
|
|
|
# Clean up the SSH keyfile, if it exists
|
|
|
|
if [ -f "${HOME}/oidc_azure_container_key" ]; then
|
|
|
|
rm -f $HOME/oidc_azure_container_key
|
|
|
|
echo "Cleaned up container key"
|
|
|
|
fi
|
|
|
|
|
2024-08-07 23:01:42 +02:00
|
|
|
python src/mongo/db/modules/enterprise/jstests/external_auth_oidc_azure/lib/toggle_ingress.py disable --config_file=$HOME/azure_e2e_config.json --lock_file=/tmp/azure_oidc.lock
|
2024-03-18 19:17:01 +01:00
|
|
|
|
|
|
|
# Clean up the config file, if it exists
|
|
|
|
if [ -f "${HOME}/azure_e2e_config.json" ]; then
|
|
|
|
rm -f $HOME/azure_e2e_config.json
|
|
|
|
echo "Cleaned up azure_e2e_config.json"
|
|
|
|
fi
|
2024-08-07 23:01:42 +02:00
|
|
|
|
|
|
|
# Clean up the lock file, if it exists
|
|
|
|
if [ -f "/tmp/azure_oidc.lock" ]; then
|
|
|
|
rm -f /tmp/azure_oidc.lock
|
|
|
|
echo "Cleaned up /tmp/azure_oidc.lock"
|
|
|
|
fi
|