From 4e3d9ddb8c1b5f2d5973408e2910cfcd24a2c98e Mon Sep 17 00:00:00 2001 From: Ieuan Byers Date: Sat, 5 Oct 2024 11:48:10 +0100 Subject: [PATCH] Enable jobs --- .github/workflows/sqlmi-auto-shutdown.yaml | 114 +++++++++--------- .../workflows/storage-sftp-auto-disable.yaml | 114 +++++++++--------- 2 files changed, 114 insertions(+), 114 deletions(-) diff --git a/.github/workflows/sqlmi-auto-shutdown.yaml b/.github/workflows/sqlmi-auto-shutdown.yaml index 5371f76d..fdea93dc 100644 --- a/.github/workflows/sqlmi-auto-shutdown.yaml +++ b/.github/workflows/sqlmi-auto-shutdown.yaml @@ -1,66 +1,66 @@ -# name: sql-managed-instance-auto-shutdown -# on: -# workflow_dispatch: -# schedule: -# - cron: '0 19 * * *' # Every day at 8pm 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 - Sql Managed Instance Auto Shutdown -# run: ./scripts/sqlmi/auto-start-stop.sh stop staging -# env: -# DEV_ENV: ${{ env.DEV_ENV }} +name: sql-managed-instance-auto-shutdown +on: + workflow_dispatch: + schedule: + - cron: "0 19 * * *" # Every day at 8pm 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 - Sql Managed Instance Auto Shutdown + run: ./scripts/sqlmi/auto-start-stop.sh stop staging + env: + DEV_ENV: ${{ env.DEV_ENV }} -# - name: Testing - Sql Managed Instance Auto Shutdown -# run: ./scripts/sqlmi/auto-start-stop.sh stop testing -# env: -# DEV_ENV: ${{ env.DEV_ENV }} + - name: Testing - Sql Managed Instance Auto Shutdown + run: ./scripts/sqlmi/auto-start-stop.sh stop testing + env: + DEV_ENV: ${{ env.DEV_ENV }} -# - name: Demo - Sql Managed Instance Auto Shutdown -# run: ./scripts/sqlmi/auto-start-stop.sh stop demo -# env: -# DEV_ENV: ${{ env.DEV_ENV }} + - name: Demo - Sql Managed Instance Auto Shutdown + run: ./scripts/sqlmi/auto-start-stop.sh stop demo + env: + DEV_ENV: ${{ env.DEV_ENV }} -# - name: Development - Sql Managed Instance Auto Shutdown -# run: ./scripts/sqlmi/auto-start-stop.sh stop development -# env: -# DEV_ENV: ${{ env.DEV_ENV }} + - name: Development - Sql Managed Instance Auto Shutdown + run: ./scripts/sqlmi/auto-start-stop.sh stop development + env: + DEV_ENV: ${{ env.DEV_ENV }} -# - name: Sandbox - Sql Managed Instance Auto Shutdown -# run: ./scripts/sqlmi/auto-start-stop.sh stop sandbox -# env: -# DEV_ENV: ${{ env.DEV_ENV }} + - name: Sandbox - Sql Managed Instance Auto Shutdown + run: ./scripts/sqlmi/auto-start-stop.sh stop sandbox + env: + DEV_ENV: ${{ env.DEV_ENV }} -# - name: ITHC - Sql Managed Instance Auto Shutdown -# run: ./scripts/sqlmi/auto-start-stop.sh stop ithc -# env: -# DEV_ENV: ${{ env.DEV_ENV }} + - name: ITHC - Sql Managed Instance Auto Shutdown + run: ./scripts/sqlmi/auto-start-stop.sh stop ithc + env: + DEV_ENV: ${{ env.DEV_ENV }} -# - name: Untagged - Sql Managed Instance Auto Shutdown -# run: ./scripts/sqlmi/auto-start-stop.sh stop untagged -# env: -# DEV_ENV: ${{ env.DEV_ENV }} + - name: Untagged - Sql Managed Instance Auto Shutdown + run: ./scripts/sqlmi/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 Sql Managed Instance to stop -# if: env.DEV_ENV != 'true' -# run: sleep 600 + - name: Wait for Sql Managed Instance to stop + if: env.DEV_ENV != 'true' + run: sleep 600 -# - name: Sql Managed Instance status check -# if: env.DEV_ENV != 'true' -# run: ./scripts/sqlmi/sqlmistatus.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }} + - name: Sql Managed Instance status check + if: env.DEV_ENV != 'true' + run: ./scripts/sqlmi/sqlmistatus.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }} diff --git a/.github/workflows/storage-sftp-auto-disable.yaml b/.github/workflows/storage-sftp-auto-disable.yaml index 74f9f7b1..6bb377b3 100644 --- a/.github/workflows/storage-sftp-auto-disable.yaml +++ b/.github/workflows/storage-sftp-auto-disable.yaml @@ -1,60 +1,60 @@ -# name: storage-sftp-auto-disable -# on: -# workflow_dispatch: -# schedule: -# - cron: "0 19 * * *" # Every day at 8pm 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 - disable sftp -# run: ./scripts/blob-storage/disable_sftp.sh staging -# env: -# DEV_ENV: ${{ env.DEV_ENV }} -# - name: Testing - disable sftp -# run: ./scripts/blob-storage/disable_sftp.sh testing -# env: -# DEV_ENV: ${{ env.DEV_ENV }} -# - name: Demo - disable sftp -# run: ./scripts/blob-storage/disable_sftp.sh demo -# env: -# DEV_ENV: ${{ env.DEV_ENV }} -# - name: Development - disable sftp -# run: ./scripts/blob-storage/disable_sftp.sh development -# env: -# DEV_ENV: ${{ env.DEV_ENV }} -# - name: Sandbox - disable sftp -# run: ./scripts/blob-storage/disable_sftp.sh sandbox -# env: -# DEV_ENV: ${{ env.DEV_ENV }} -# - name: ITHC - disable sftp -# run: ./scripts/blob-storage/disable_sftp.sh ithc -# env: -# DEV_ENV: ${{ env.DEV_ENV }} -# - name: Untagged - disable sftp -# run: ./scripts/blob-storage/disable_sftp.sh untagged -# env: -# DEV_ENV: ${{ env.DEV_ENV }} +name: storage-sftp-auto-disable +on: + workflow_dispatch: + schedule: + - cron: "0 19 * * *" # Every day at 8pm 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 - disable sftp + run: ./scripts/blob-storage/disable_sftp.sh staging + env: + DEV_ENV: ${{ env.DEV_ENV }} + - name: Testing - disable sftp + run: ./scripts/blob-storage/disable_sftp.sh testing + env: + DEV_ENV: ${{ env.DEV_ENV }} + - name: Demo - disable sftp + run: ./scripts/blob-storage/disable_sftp.sh demo + env: + DEV_ENV: ${{ env.DEV_ENV }} + - name: Development - disable sftp + run: ./scripts/blob-storage/disable_sftp.sh development + env: + DEV_ENV: ${{ env.DEV_ENV }} + - name: Sandbox - disable sftp + run: ./scripts/blob-storage/disable_sftp.sh sandbox + env: + DEV_ENV: ${{ env.DEV_ENV }} + - name: ITHC - disable sftp + run: ./scripts/blob-storage/disable_sftp.sh ithc + env: + DEV_ENV: ${{ env.DEV_ENV }} + - name: Untagged - disable sftp + run: ./scripts/blob-storage/disable_sftp.sh 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 SFTP Servers to stop -# if: env.DEV_ENV != 'true' -# run: sleep 300 + - name: Wait for SFTP Servers to stop + if: env.DEV_ENV != 'true' + run: sleep 300 -# - name: sftp status check -# if: env.DEV_ENV != 'true' -# run: ./scripts/blob-storage/sftp-check-status.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }} + - name: sftp status check + if: env.DEV_ENV != 'true' + run: ./scripts/blob-storage/sftp-check-status.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }}