Skip to content
name: Enable maintenance
on:
push:
branches:
- 1684-spike-maintenance-page
workflow_dispatch:
inputs:
environment:
required: true
type: string
options:
- review
- qa
jobs:
enable-maintenance:
name: Enable maintenance app
runs-on: ubuntu-latest
environment: review
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and push docker image
uses: DFE-Digital/github-actions/build-docker-image@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile-path: service_unavailable_page/Dockerfile
docker-repository: ghcr.io/dfe-digital/apply-teacher-training-maintenance
context: service_unavailable_page
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Set up kubelogin for non-interactive login
uses: azure/use-kubelogin@v1
with:
kubelogin-version: 'v0.0.34'
- uses: azure/aks-set-context@v3
with:
resource-group: s189t01-tsc-ts-rg
cluster-name: s189t01-tsc-test-aks
use-kubelogin: true
admin: 'false'
- name: Deploy maintenance app
run: |
echo Create maintenance deployment
kubectl apply -f service_unavailable_page/manifests/deployment_maintenance.yml
echo Create maintenance service
kubectl apply -f service_unavailable_page/manifests/service_maintenance.yml
echo Create maintenance ingress
kubectl apply -f service_unavailable_page/manifests/ingress_maintenance.yml
- name: Switch traffic to maintenance app
run: |
echo Configure external ingress to point at the maintenance app
kubectl apply -f service_unavailable_page/manifests/ingress_external_maintenance.yml
echo Configure internal ingress to point at the maintenance app
kubectl apply -f service_unavailable_page/manifests/ingress_internal_maintenance.yml
echo Create temp ingress
kubectl apply -f service_unavailable_page/manifests/ingress_temp_to_main.yml