Skip to content

Commit

Permalink
Remove references to AKS
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleese committed Jul 31, 2023
1 parent e6d92d7 commit 95d658b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Deploy environment to AKS
description: Deploys an application environment to AKS
name: Deploy environment
description: Deploys an application environment

inputs:
environment:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Backup production
runs-on: ubuntu-latest

environment: production_aks
environment: production

services:
postgres:
Expand Down Expand Up @@ -118,8 +118,7 @@ jobs:
needs: [backup-production]
runs-on: ubuntu-latest

environment:
name: preproduction_aks
environment: preproduction

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete-review-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
concurrency: deploy_review_${{ github.event.pull_request.number }}
if: ${{ contains(github.event.pull_request.labels.*.name, 'deploy') }}
runs-on: ubuntu-latest
environment: review_aks
environment: review
steps:
- uses: actions/checkout@v3

Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
environment:
description: "Deploy environment"
required: true
default: development_aks
default: development
type: environment
options:
- development_aks
- test_aks
- preproduction_aks
- production_aks
- development
- test
- preproduction
- production
push:
branches:
- main
Expand Down Expand Up @@ -119,11 +119,11 @@ jobs:
needs: [docker, rspec]
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'deploy')
environment: review_aks
environment: review
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/deploy-environment-to-aks
- uses: ./.github/actions/deploy-environment
id: deploy
with:
environment: review
Expand All @@ -138,8 +138,8 @@ jobs:
message: |
Review app deployed to ${{ steps.deploy.outputs.url }}/personas
deploy_nonprod_aks:
name: Deploy to ${{ matrix.environment }} AKS environment
deploy_non_production:
name: Deploy to ${{ matrix.environment }} environment
runs-on: ubuntu-latest
needs: [docker, rspec]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
Expand All @@ -149,35 +149,35 @@ jobs:
matrix:
environment: [development, test, preproduction]
environment:
name: ${{ matrix.environment }}_aks
name: ${{ matrix.environment }}
url: ${{ steps.deploy.outputs.url }}
outputs:
environment_name: ${{ matrix.environment }}

steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/deploy-environment-to-aks
- uses: ./.github/actions/deploy-environment
id: deploy
with:
environment: ${{ matrix.environment }}
docker-image: ${{ needs.docker.outputs.image }}
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}

deploy_production_aks:
name: Deploy to production AKS environment
needs: [docker, rspec, deploy_nonprod_aks]
deploy_production:
name: Deploy to production environment
needs: [docker, rspec, deploy_non_production]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
environment:
name: production_aks
name: production
url: ${{ steps.deploy.outputs.url }}
concurrency: deploy_production_aks
concurrency: deploy_production

steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/deploy-environment-to-aks
- uses: ./.github/actions/deploy-environment
id: deploy
with:
environment: production
Expand All @@ -188,10 +188,10 @@ jobs:
notify_slack_of_failures:
name: Notify Slack of failures
runs-on: ubuntu-latest
environment: development_aks
environment: development

if: ${{ failure() && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
needs: [docker, rspec, deploy_nonprod_aks]
needs: [docker, rspec, deploy_non_production]

steps:
- uses: actions/checkout@v3
Expand All @@ -213,9 +213,9 @@ jobs:
- name: Notify Slack channel on job failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_TITLE: Deployment of apply-for-qualified-teacher-status to ${{ needs.deploy_nonprod_aks.outputs.environment_name }} failed
SLACK_TITLE: Deployment of apply-for-qualified-teacher-status to ${{ needs.deploy_non_production.outputs.environment_name }} failed
SLACK_MESSAGE: |
Deployment to ${{ needs.deploy_nonprod_aks.outputs.environment_name }} environment failed
Deployment to ${{ needs.deploy_non_production.outputs.environment_name }} environment failed
SLACK_WEBHOOK: ${{ steps.key-vault-secrets.outputs.SLACK-WEBHOOK }}
SLACK_COLOR: failure
SLACK_FOOTER: Sent from notify_slack_of_failures job in deploy workflow

0 comments on commit 95d658b

Please sign in to comment.