From 3e3c21ab1b92430c36ad357c54cb005f283cb426 Mon Sep 17 00:00:00 2001 From: ashmrtn Date: Tue, 18 Oct 2022 10:01:48 -0700 Subject: [PATCH] Update purge CI task (#1193) ## Description Add a call to the purge job for the secondary CI test user. Requires an update to the workflow secrets to populate the secondary user name. ## Type of change - [ ] :sunflower: Feature - [ ] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Test - [x] :computer: CI/Deployment - [ ] :hamster: Trivial/Minor ## Issue(s) * #1185 ## Test Plan - [ ] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- .github/workflows/ci_test_cleanup.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_test_cleanup.yml b/.github/workflows/ci_test_cleanup.yml index 7886ffbd1..94e597a95 100644 --- a/.github/workflows/ci_test_cleanup.yml +++ b/.github/workflows/ci_test_cleanup.yml @@ -28,7 +28,7 @@ jobs: echo "HALF_HOUR_AGO=$(date -d '30 minutes ago' -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV # run the folder purge - - name: Purge folders + - name: Purge primary user folders working-directory: ./src env: AZURE_CLIENT_ID: ${{ secrets.CLIENT_ID }} @@ -41,3 +41,17 @@ jobs: --user ${{ secrets.CORSO_M356_TEST_USER_ID }} --prefix ${{ env.DELETE_FOLDER_PREFIX }} --before ${{ env.HALF_HOUR_AGO }} + + - name: Purge secondary user folders + working-directory: ./src + env: + AZURE_CLIENT_ID: ${{ secrets.CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} + AZURE_TENANT_ID: ${{ secrets.TENANT_ID }} + CORSO_M356_TEST_USER_ID: ${{ secrets.CORSO_SECONDARY_M356_TEST_USER_ID }} + DELETE_FOLDER_PREFIX: "Corso_Restore_" + run: > + go run ./cmd/purge/purge.go + --user ${{ secrets.CORSO_SECONDARY_M356_TEST_USER_ID }} + --prefix ${{ env.DELETE_FOLDER_PREFIX }} + --before ${{ env.HALF_HOUR_AGO }}