From 3c34943f349617f83900dbfb5c37f133ef4c9c9d Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Mon, 30 Dec 2024 15:47:18 +0000 Subject: [PATCH] Remove enable/disable maintenance workflows They are superseded by the Set maintenance mode workflow --- .github/workflows/disable-maintenance.yml | 41 ----------------- .github/workflows/enable-maintenance.yml | 55 ----------------------- docs/incident-cheatsheet.md | 4 +- 3 files changed, 2 insertions(+), 98 deletions(-) delete mode 100644 .github/workflows/disable-maintenance.yml delete mode 100644 .github/workflows/enable-maintenance.yml diff --git a/.github/workflows/disable-maintenance.yml b/.github/workflows/disable-maintenance.yml deleted file mode 100644 index 0b765d1ff..000000000 --- a/.github/workflows/disable-maintenance.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Disable maintenance - -on: - workflow_dispatch: - inputs: - environment: - required: true - type: choice - options: - - staging - - production - -jobs: - disable-maintenance: - name: Disable maintenance app - runs-on: ubuntu-latest - environment: ${{ inputs.environment }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - uses: azure/login@v2 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Set ARM and kubelogin environment - uses: DFE-Digital/github-actions/set-kubelogin-environment@master - with: - azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Disable maintenance app - run: make ${{ inputs.environment }} disable-maintenance - - - name: Maintenance Summary - if: success() - run: | - NOW=$(TZ=Europe/London date +"%F %R") - echo 'MAINTENANCE PAGE DISABLED!' >> $GITHUB_STEP_SUMMARY - echo 'ENV: ${{ inputs.environment }}' >> $GITHUB_STEP_SUMMARY - echo "AT : ${NOW}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/enable-maintenance.yml b/.github/workflows/enable-maintenance.yml deleted file mode 100644 index 38dc1f2e5..000000000 --- a/.github/workflows/enable-maintenance.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Enable maintenance - -on: - workflow_dispatch: - inputs: - environment: - required: true - type: choice - options: - - staging - - production - -jobs: - enable-maintenance: - name: Enable maintenance app - runs-on: ubuntu-latest - environment: ${{ inputs.environment }} - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Build and push docker image - id: build-image - uses: DFE-Digital/github-actions/build-docker-image@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - dockerfile-path: maintenance_page/Dockerfile - docker-repository: ghcr.io/dfe-digital/itt-mentor-services-maintenance - context: maintenance_page - - - uses: azure/login@v2 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Set ARM and kubelogin environment - uses: DFE-Digital/github-actions/set-kubelogin-environment@master - with: - azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Deploy maintenance app - run: make ${{ inputs.environment }} maintenance-fail-over - env: - MAINTENANCE_IMAGE_TAG: ${{steps.build-image.outputs.tag}} - - - name: Maintenance Summary - if: success() - run: | - NOW=$(TZ=Europe/London date +"%F %R") - echo 'MAINTENANCE PAGE ENABLED!' >> $GITHUB_STEP_SUMMARY - echo 'ENV: ${{ inputs.environment }}' >> $GITHUB_STEP_SUMMARY - echo "AT : ${NOW}" >> $GITHUB_STEP_SUMMARY - TEMP_URLS=$(awk '/name:.*cloud/ {print $2}' ./maintenance_page/manifests/${{ inputs.environment }}/ingress_temp*.yml) - echo 'TEMP URLS:' >> $GITHUB_STEP_SUMMARY - echo "${TEMP_URLS}" >> $GITHUB_STEP_SUMMARY diff --git a/docs/incident-cheatsheet.md b/docs/incident-cheatsheet.md index 0b8db9821..bf67ebfd0 100644 --- a/docs/incident-cheatsheet.md +++ b/docs/incident-cheatsheet.md @@ -6,7 +6,7 @@ Stay calm and refer to the [incident playbook](https://tech-docs.teacherservices ## Maintenance Page -To stop users accessing the app, [enable the maintenance page](https://github.com/DFE-Digital/itt-mentor-services/actions/workflows/enable-maintenance.yml). +To stop users accessing the app, [enable the maintenance page](https://github.com/DFE-Digital/itt-mentor-services/actions/workflows/maintenance.yml). ### Temporary Ingress URL @@ -18,7 +18,7 @@ The `application.tf` file is located at [terraform/application/application.tf](/ ### Maintenance Page HTML -The maintenance page is located at [maintenance_page/html/index.html](/maintenance_page/html/index.html). This file is displayed when the maintenance page is enabled. +The maintenance pages for each service are located at [claim-funding-for-mentor-training](/maintenance_page/html/claim-funding-for-mentor-training.html) and [manage-school-placements](/maintenance_page/html/manage-school-placements.html). Each file is displayed for the corresponding service when the maintenance page is enabled. ## Current Deployment SHA Ref