Skip to content

Commit 4527055

Browse files
authored
chore: Updates cleanup-test-env workflow for MongoDB Atlas provider and cleanup script (#1281)
1 parent 8455205 commit 4527055

File tree

2 files changed

+65
-79
lines changed

2 files changed

+65
-79
lines changed

.github/workflows/cleanup-test-env.yml

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,77 @@ on:
66
- cron: "0 3 * * *" # workflow runs every day at 03:00 AM
77

88
jobs:
9-
clenup-test-env-general:
9+
cleanup-dev-cfn-test-github:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout
12+
- name: terraform-provider-mongodbatlas-checkout
1313
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
1414
with:
15-
sparse-checkout: |
16-
scripts
17-
- uses: mongodb/atlas-github-action@15663d068c40a8582d881560961fce9d45e0df9a
15+
repository: mongodb/terraform-provider-mongodbatlas
1816
- name: Cleanup cloud-dev CFN Test GitHub
19-
shell: bash
17+
uses: ./.github/templates/clean-atlas-org
2018
env:
2119
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.CLOUD_DEV_PUBLIC_KEY }}
2220
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.CLOUD_DEV_PRIVATE_KEY }}
2321
MONGODB_ATLAS_ORG_ID: ${{ secrets.CLOUD_DEV_ORG_ID }}
24-
MONGODB_ATLAS_OPS_MANAGER_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }}
25-
PROJECT_TO_NOT_DELETE: ${{ vars.CLOUD_DEV_PROJECT_ID }}
26-
run: ./scripts/cleanup-test-env.sh
22+
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }}
23+
MONGODB_ATLAS_CLEAN_RETRY_ATTEMPTS: "1"
24+
cleanup-dev-cfntest:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: terraform-provider-mongodbatlas-checkout
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
29+
with:
30+
repository: mongodb/terraform-provider-mongodbatlas
31+
- name: Cleanup cloud-dev CFN Test
32+
uses: ./.github/templates/clean-atlas-org
33+
env:
34+
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.CLOUD_DEV_CFN_TEST_PUBLIC_KEY }}
35+
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.CLOUD_DEV_CFN_TEST_PRIVATE_KEY }}
36+
MONGODB_ATLAS_ORG_ID: ${{ secrets.CLOUD_DEV_CFN_TEST_ORG_ID }}
37+
MONGODB_ATLAS_BASE_URL: ${{ vars.MONGODB_ATLAS_BASE_URL }}
38+
MONGODB_ATLAS_CLEAN_RETRY_ATTEMPTS: "1"
39+
cleanup-qa-env-rp:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: terraform-provider-mongodbatlas-checkout
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
44+
with:
45+
repository: mongodb/terraform-provider-mongodbatlas
46+
- name: Cleanup cloud-dev CFN Test GitHub
47+
uses: ./.github/templates/clean-atlas-org
48+
env:
49+
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_RP_PUBLIC_KEY_QA }}
50+
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_RP_PRIVATE_KEY_QA }}
51+
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_RP_ORG_ID_QA }}
52+
MONGODB_ATLAS_BASE_URL: https://cloud-qa.mongodb.com/
53+
MONGODB_ATLAS_CLEAN_RETRY_ATTEMPTS: "1"
54+
cleanup-prod-env-general:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: terraform-provider-mongodbatlas-checkout
58+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
59+
with:
60+
repository: mongodb/terraform-provider-mongodbatlas
61+
- name: Cleanup cloud-dev CFN Test GitHub
62+
uses: ./.github/templates/clean-atlas-org
63+
env:
64+
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.ATLAS_PUBLIC_KEY_PUBLISHING }}
65+
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.ATLAS_PRIVATE_KEY_PUBLISHING }}
66+
MONGODB_ATLAS_ORG_ID: ${{ secrets.ATLAS_ORG_ID_PUBLISHING }}
67+
MONGODB_ATLAS_CLEAN_RETRY_ATTEMPTS: "1"
68+
cleanup-prod-data-federation:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: terraform-provider-mongodbatlas-checkout
72+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
73+
with:
74+
repository: mongodb/terraform-provider-mongodbatlas
75+
ref: 133ee57735e0c8f2b22e74bbd9f8c3fdd8da2f9c
76+
- name: Cleanup cloud-dev CFN Test GitHub
77+
uses: ./.github/templates/clean-atlas-org
78+
env:
79+
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.ATLAS_PUBLIC_KEY_FOR_FEDERATION_PUBLISHING }}
80+
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.ATLAS_PRIVATE_KEY_FOR_FEDERATION_PUBLISHING }}
81+
MONGODB_ATLAS_ORG_ID: ${{ vars.ATLAS_ORG_ID_FOR_FEDERATION_PUBLISHING }}
82+
MONGODB_ATLAS_CLEAN_RETRY_ATTEMPTS: "1"

scripts/cleanup-test-env.sh

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)