Skip to content

TEMP

TEMP #1793

Workflow file for this run

name: Deploy Cluster
on:
push:
branches:
# - main
- oidc-smoke-test
# pull_request:
# branches:
# - main
# types:
# - labeled
# - synchronize
# - reopened
# - opened
# - converted_to_draft
jobs:
# validate-terraform:
# name: Validate Terraform
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Validate cluster/terraform_aks_cluster
# uses: ./.github/actions/validate-terraform
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# terraform_root_folder: cluster/terraform_aks_cluster
# - name: Validate cluster/terraform_kubernetes
# uses: ./.github/actions/validate-terraform
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# terraform_root_folder: cluster/terraform_kubernetes
# terraform_modules_tag: main
# terraform_modules_dir: aks
# - name: Validate custom_domains/terraform/infrastructure
# uses: ./.github/actions/validate-terraform
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# terraform_root_folder: custom_domains/terraform/infrastructure
# terraform_modules_tag: testing
# terraform_modules_dir: domains
# - name: Validate templates/new_service/terraform/application
# uses: ./.github/actions/validate-terraform
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# terraform_root_folder: templates/new_service/terraform/application
# terraform_modules_tag: main
# terraform_modules_dir: aks
# - name: Validate templates/new_service/terraform/domains/infrastructure
# uses: ./.github/actions/validate-terraform
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# terraform_root_folder: templates/new_service/terraform/domains/infrastructure
# terraform_modules_tag: testing
# terraform_modules_dir: domains
# - name: Validate templates/new_service/terraform/domains/environment_domains
# uses: ./.github/actions/validate-terraform
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# terraform_root_folder: templates/new_service/terraform/domains/environment_domains
# terraform_modules_tag: testing
# terraform_modules_dir: domains
# - name: Send Slack notification on failure
# if: ${{ failure() && github.ref == 'refs/heads/main' }}
# uses: rtCamp/action-slack-notify@master
# env:
# SLACK_COLOR: '#ef5343'
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# SLACK_TITLE: A Cluster update failure has occurred
# SLACK_MESSAGE: |
# The terraform validation during cluster update has failed
# Workflow Failed: <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View details>
deploy:
name: Deploy Cluster
concurrency: deploy_${{ matrix.environment }}
environment:
name: ${{ matrix.environment }}
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
environment: [platform-test, test, production]
permissions:
id-token: write # Required for OIDC authentication to Azure
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/deploy-environment
with:
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
environment_name: ${{ matrix.environment }}
- name: Test application deployment
if: vars.TEST_APP_DEPLOYMENT == 'true'
uses: ./.github/actions/test-app-deployment
with:
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
environment: ${{ vars.ITTMS_ENVIRONMENT }}