generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 40
53 lines (47 loc) · 1.7 KB
/
stop_test_servers.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
name: Stop Apps in Test server
on:
workflow_dispatch:
# push:
# branches:
# - feature/9537-schedulemaintenance_DemoandTest
schedule:
- cron: "0 5 * * SAT" #UTC-5
- cron: '0 2 * * 1-5'
env:
AZURE_CREDENTIALS: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
jobs:
alert_stale_branches:
name: Stop Test Subscription apps
runs-on: ubuntu-latest
steps:
- name: Check Out Changes
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- name: Connect to VPN and login to Azure
uses: ./.github/actions/vpn-azure
with:
env-name: ${{ needs.pre_job.outputs.env_name }}
tls-key: ${{ secrets.TLS_KEY }}
ca-cert: ${{ secrets.CA_CRT}}
user-crt: ${{ secrets.USER_CRT }}
user-key: ${{ secrets.USER_KEY }}
sp-creds: ${{ env.AZURE_CREDENTIALS }}
tf-auth: true
# Login to Azure
- uses: azure/login@v2
with:
creds: ${{ env.AZURE_CREDENTIALS }}
- name: Stop postgres
uses: ./.github/actions/Stop-PostgresDB
with:
name: "pdhtest-pgsql-flex"
resource-group: prime-data-hub-test
subscription: OCIO-DMZ-C1
pass: ${{ secrets.POSTGRESQL_Test_PWD }}
creds: ${{ env.AZURE_CREDENTIALS }}
- name: Stop function app
uses: ./.github/actions/Stop-AzFunction
with:
resourceGroupName: prime-data-hub-test
Subscription: "OCIO-DMZ-C1"
functionName: pdhtest-functionapp
functionAppName: pdhtest-functionapp