diff --git a/.github/workflows/cleanup-dp.yml b/.github/workflows/cleanup-dp.yml index 9167bd6c29..b572786cbe 100644 --- a/.github/workflows/cleanup-dp.yml +++ b/.github/workflows/cleanup-dp.yml @@ -1,13 +1,8 @@ name: Cleanup Deploy Previews on: - # This line enables manual triggering of this workflow. - workflow_dispatch: - -#on: -# # This line enables manual triggering of this workflow. -# schedule: -# - cron: 0 0 * * * + schedule: + - cron: 0 0 * * * jobs: execute: diff --git a/scripts/cleanup_dp.sh b/scripts/cleanup_dp.sh index fdea8fc2b9..6a21fa06e1 100644 --- a/scripts/cleanup_dp.sh +++ b/scripts/cleanup_dp.sh @@ -37,8 +37,8 @@ for i in $deployed_charts echo $pr_state if [[ $pr_state == "MERGED" ]] then - echo "helm uninstall $i -n $i" - echo kubectl delete ns $i || echo "true" - echo mongosh "mongodb+srv://$DB_USERNAME:$DB_PASSWORD@$DB_URL/$i?retryWrites=true&minPoolSize=1&maxPoolSize=10&maxIdleTimeMS=900000&authSource=admin" --eval 'db.dropDatabase()' + helm uninstall $i -n $i + kubectl delete ns $i || true + mongosh "mongodb+srv://$DB_USERNAME:$DB_PASSWORD@$DB_URL/$i?retryWrites=true&minPoolSize=1&maxPoolSize=10&maxIdleTimeMS=900000&authSource=admin" --eval 'db.dropDatabase()' fi done