From f32623420ef6db05d3bf900da576a3bad213dc64 Mon Sep 17 00:00:00 2001 From: Goutham Pratapa Date: Mon, 17 Apr 2023 15:45:52 +0530 Subject: [PATCH] ci: uncomment debug statements and clear dps when merged (#22463) Succesful run: https://github.com/appsmithorg/appsmith/actions/runs/4718116171/jobs/8367371248 --- .github/workflows/cleanup-dp.yml | 9 ++------- scripts/cleanup_dp.sh | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) 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