Skip to content

Commit

Permalink
Temp disable autoshutdown scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ieuanb74 committed Oct 5, 2024
1 parent 27478fe commit 70b8719
Show file tree
Hide file tree
Showing 12 changed files with 591 additions and 591 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/aks-auto-shutdown.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: aks-auto-shutdown
on:
workflow_dispatch:
schedule:
- cron: '0 19,22 * * *' # Every day at 20:00 and 23:00 BST
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# name: aks-auto-shutdown
# on:
# workflow_dispatch:
# schedule:
# - cron: '0 19,22 * * *' # Every day at 20:00 and 23:00 BST
# permissions:
# id-token: write
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4

- name: 'Az CLI login'
uses: azure/login@v2
with:
client-id: 2b6fa9d7-7dba-4600-a58a-5e25554997aa # DTS AKS Auto-Shutdown
tenant-id: 531ff96d-0ae9-462a-8d2d-bec7c0b42082 # HMCTS.NET
allow-no-subscriptions: true
# - name: 'Az CLI login'
# uses: azure/login@v2
# with:
# client-id: 2b6fa9d7-7dba-4600-a58a-5e25554997aa # DTS AKS Auto-Shutdown
# tenant-id: 531ff96d-0ae9-462a-8d2d-bec7c0b42082 # HMCTS.NET
# allow-no-subscriptions: true

- name: AKS Auto Shutdown
run: ./scripts/aks/auto-start-stop.sh stop
env:
DEV_ENV: ${{ secrets.DEV_ENV }}
# - name: AKS Auto Shutdown
# run: ./scripts/aks/auto-start-stop.sh stop
# env:
# DEV_ENV: ${{ secrets.DEV_ENV }}

- name: Output log file
run: ./scripts/common/log-output.sh
# - name: Output log file
# run: ./scripts/common/log-output.sh

- name: Wait for clusters to stop
run: sleep 600
# - name: Wait for clusters to stop
# run: sleep 600

- name: AKS Auto Shutdown status check
run: ./scripts/aks/auto-shutdown-status.sh stop ${{ secrets.REGISTRYSLACKWEBHOOK }}
# - name: AKS Auto Shutdown status check
# run: ./scripts/aks/auto-shutdown-status.sh stop ${{ secrets.REGISTRYSLACKWEBHOOK }}
74 changes: 37 additions & 37 deletions .github/workflows/aks-auto-start.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: aks-auto-start
on:
workflow_dispatch:
inputs:
DRYRUN:
options:
- "false"
- "true"
schedule:
- cron: '30 5 * * 1-5' # Every weekday at 6:30am BST
env:
DRYRUN: ${{ inputs.DRYRUN }}
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# name: aks-auto-start
# on:
# workflow_dispatch:
# inputs:
# DRYRUN:
# options:
# - "false"
# - "true"
# schedule:
# - cron: '30 5 * * 1-5' # Every weekday at 6:30am BST
# env:
# DRYRUN: ${{ inputs.DRYRUN }}
# permissions:
# id-token: write
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4

- name: 'Az CLI login'
uses: azure/login@v2
with:
client-id: 2b6fa9d7-7dba-4600-a58a-5e25554997aa # DTS AKS Auto-Shutdown
tenant-id: 531ff96d-0ae9-462a-8d2d-bec7c0b42082 # HMCTS.NET
allow-no-subscriptions: true

- name: AKS Auto Start
run: ./scripts/aks/auto-start-stop.sh start
env:
DEV_ENV: ${{ secrets.DEV_ENV }}
# - name: 'Az CLI login'
# uses: azure/login@v2
# with:
# client-id: 2b6fa9d7-7dba-4600-a58a-5e25554997aa # DTS AKS Auto-Shutdown
# tenant-id: 531ff96d-0ae9-462a-8d2d-bec7c0b42082 # HMCTS.NET
# allow-no-subscriptions: true

- name: Output log file
run: ./scripts/common/log-output.sh
# - name: AKS Auto Start
# run: ./scripts/aks/auto-start-stop.sh start
# env:
# DEV_ENV: ${{ secrets.DEV_ENV }}

- name: Wait for cluster to start
run: sleep 600
# - name: Output log file
# run: ./scripts/common/log-output.sh

- name: AKS Auto Shutdown status check
run: ./scripts/aks/auto-shutdown-status.sh start ${{ secrets.REGISTRYSLACKWEBHOOK }}
# - name: Wait for cluster to start
# run: sleep 600

# - name: AKS Auto Shutdown status check
# run: ./scripts/aks/auto-shutdown-status.sh start ${{ secrets.REGISTRYSLACKWEBHOOK }}
116 changes: 58 additions & 58 deletions .github/workflows/appgateway-auto-shutdown.yaml
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
name: AppGateway-auto-shutdown
on:
workflow_dispatch:
schedule:
- cron: '0 19,22 * * *' # Every day at 20:00 and 23:00 BST
env:
DEV_ENV: ${{ secrets.DEV_ENV }}
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 'Az CLI login'
uses: azure/login@v2
with:
client-id: 2b6fa9d7-7dba-4600-a58a-5e25554997aa # DTS AKS Auto-Shutdown
tenant-id: 531ff96d-0ae9-462a-8d2d-bec7c0b42082 # HMCTS.NET
allow-no-subscriptions: true
- name: Staging - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh stop staging
env:
DEV_ENV: ${{ env.DEV_ENV }}
# name: AppGateway-auto-shutdown
# on:
# workflow_dispatch:
# schedule:
# - cron: '0 19,22 * * *' # Every day at 20:00 and 23:00 BST
# env:
# DEV_ENV: ${{ secrets.DEV_ENV }}
# permissions:
# id-token: write
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: 'Az CLI login'
# uses: azure/login@v2
# with:
# client-id: 2b6fa9d7-7dba-4600-a58a-5e25554997aa # DTS AKS Auto-Shutdown
# tenant-id: 531ff96d-0ae9-462a-8d2d-bec7c0b42082 # HMCTS.NET
# allow-no-subscriptions: true
# - name: Staging - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh stop staging
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Testing - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh stop testing
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: Testing - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh stop testing
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Demo - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh stop demo
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: Demo - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh stop demo
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Development - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh stop development
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: Development - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh stop development
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Sandbox - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh stop sandbox
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: Sandbox - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh stop sandbox
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: ITHC - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh stop ithc
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: ITHC - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh stop ithc
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Untagged - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh stop untagged
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: Untagged - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh stop untagged
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Output log file
run: ./scripts/common/log-output.sh
# - name: Output log file
# run: ./scripts/common/log-output.sh

- name: Wait for App Gateways to stop
if: env.DEV_ENV != 'true'
run: sleep 300
- name: App Gateway Auto Shutdown status check
if: env.DEV_ENV != 'true'
run: ./scripts/appgateway/appgw_status.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }}
# - name: Wait for App Gateways to stop
# if: env.DEV_ENV != 'true'
# run: sleep 300

# - name: App Gateway Auto Shutdown status check
# if: env.DEV_ENV != 'true'
# run: ./scripts/appgateway/appgw_status.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }}
118 changes: 59 additions & 59 deletions .github/workflows/appgateway-auto-start.yaml
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
name: AppGateway-auto-start
on:
workflow_dispatch:
schedule:
- cron: '30 5 * * 1-5' # Every weekday at 6:30am BST
env:
DEV_ENV: ${{ secrets.DEV_ENV }}
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 'Az CLI login'
uses: azure/login@v2
with:
client-id: 2b6fa9d7-7dba-4600-a58a-5e25554997aa # DTS AKS Auto-Shutdown
tenant-id: 531ff96d-0ae9-462a-8d2d-bec7c0b42082 # HMCTS.NET
allow-no-subscriptions: true
- name: Staging - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh start staging
env:
DEV_ENV: ${{ env.DEV_ENV }}
# name: AppGateway-auto-start
# on:
# workflow_dispatch:
# schedule:
# - cron: '30 5 * * 1-5' # Every weekday at 6:30am BST
# env:
# DEV_ENV: ${{ secrets.DEV_ENV }}
# permissions:
# id-token: write
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: 'Az CLI login'
# uses: azure/login@v2
# with:
# client-id: 2b6fa9d7-7dba-4600-a58a-5e25554997aa # DTS AKS Auto-Shutdown
# tenant-id: 531ff96d-0ae9-462a-8d2d-bec7c0b42082 # HMCTS.NET
# allow-no-subscriptions: true
# - name: Staging - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh start staging
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Testing - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh start testing
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: Testing - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh start testing
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Demo - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh start demo
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: Demo - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh start demo
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Development - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh start development
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: Development - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh start development
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Sandbox - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh start sandbox
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: Sandbox - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh start sandbox
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: ITHC - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh start ithc
env:
DEV_ENV: ${{ env.DEV_ENV }}
# - name: ITHC - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh start ithc
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Untagged - App Gateway Auto Shutdown
run: ./scripts/appgateway/auto-start-stop.sh start untagged
env:
DEV_ENV: ${{ env.DEV_ENV }}

- name: Output log file
run: ./scripts/common/log-output.sh
# - name: Untagged - App Gateway Auto Shutdown
# run: ./scripts/appgateway/auto-start-stop.sh start untagged
# env:
# DEV_ENV: ${{ env.DEV_ENV }}

- name: Wait for App Gateways to start
if: env.DEV_ENV != 'true'
run: sleep 300

- name: App Gateway Auto start status check
if: env.DEV_ENV != 'true'
run: ./scripts/appgateway/appgw_status.sh start ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }}
# - name: Output log file
# run: ./scripts/common/log-output.sh

# - name: Wait for App Gateways to start
# if: env.DEV_ENV != 'true'
# run: sleep 300

# - name: App Gateway Auto start status check
# if: env.DEV_ENV != 'true'
# run: ./scripts/appgateway/appgw_status.sh start ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }}
Loading

0 comments on commit 70b8719

Please sign in to comment.