-
Notifications
You must be signed in to change notification settings - Fork 179
61 lines (59 loc) · 2.39 KB
/
cleanup-test-env.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 'Cleanup test env'
on:
workflow_dispatch: # workflow can be run manually
workflow_call: # workflow runs from Test Suite
jobs:
cleanup-test-env-general:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
scripts
- uses: mongodb/[email protected]
- name: Cleanup cloud-dev
shell: bash
env:
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV }}
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV }}
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV }}
MONGODB_ATLAS_OPS_MANAGER_URL: ${{vars.MONGODB_ATLAS_BASE_URL}}
PROJECT_TO_NOT_DELETE: ${{vars.MONGODB_ATLAS_ACCTEST_TRIGGER_PROJECT_ID_CLOUD_DEV}}
run: ./scripts/cleanup-test-env.sh
cleanup-test-env-network:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
scripts
- uses: mongodb/[email protected]
- name: Cleanup test env network
shell: bash
env:
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV_NETWORK }}
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV_NETWORK }}
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV_NETWORK }}
MONGODB_ATLAS_OPS_MANAGER_URL: ${{vars.MONGODB_ATLAS_BASE_URL}}
PROJECT_TO_NOT_DELETE: ${{vars.MONGODB_ATLAS_PROJECT_ID_CLOUD_DEV_NETWORK}}
run: ./scripts/cleanup-test-env.sh
cleanup-test-env-qa:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
scripts
- uses: mongodb/[email protected]
- name: Cleanup test env network
shell: bash
env:
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.MONGODB_ATLAS_PUBLIC_KEY_CLOUD_DEV_QA }}
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.MONGODB_ATLAS_PRIVATE_KEY_CLOUD_DEV_QA }}
MONGODB_ATLAS_ORG_ID: ${{ vars.MONGODB_ATLAS_ORG_ID_CLOUD_DEV_QA }}
MONGODB_ATLAS_OPS_MANAGER_URL: ${{ vars.MONGODB_ATLAS_BASE_URL_QA }}
PROJECT_TO_NOT_DELETE: ${{ vars.MONGODB_ATLAS_PROJECT_ID_CLOUD_QA }}
run: ./scripts/cleanup-test-env.sh