Skip to content

Commit

Permalink
TEMP
Browse files Browse the repository at this point in the history
  • Loading branch information
saliceti committed Jan 19, 2024
1 parent 8eb3634 commit 2746146
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 68 deletions.
2 changes: 2 additions & 0 deletions .github/actions/deploy-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ runs:
echo ${o}=$(jq -r .${o}.value <<< "$TFOUTPUTS") >> $GITHUB_ENV
done
shell: bash
env:
ENVIRONMENT: cluster3

- name: Install kubectl
uses: azure/setup-kubectl@v3
Expand Down
137 changes: 69 additions & 68 deletions .github/workflows/deploy-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,54 +16,54 @@ on:
workflow_dispatch:

jobs:
validate-terraform:
name: Validate Terraform
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# validate-terraform:
# name: Validate Terraform
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

- 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_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
# - name: Validate cluster/terraform_kubernetes
# uses: ./.github/actions/validate-terraform
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# terraform_root_folder: cluster/terraform_kubernetes

- name: Validate custom_domains/terraform/infrastructure
uses: ./.github/actions/validate-terraform
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
terraform_root_folder: custom_domains/terraform/infrastructure
# - name: Validate custom_domains/terraform/infrastructure
# uses: ./.github/actions/validate-terraform
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# terraform_root_folder: custom_domains/terraform/infrastructure

- 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
terrafile_environment: development
# - 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
# terrafile_environment: development

- 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
terrafile_environment: zones
# - 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
# terrafile_environment: zones

- 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
terrafile_environment: development
# - 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
# terrafile_environment: development

deploy:
name: Deploy Cluster
if: github.ref == 'refs/heads/main'
# if: github.ref == 'refs/heads/main'
concurrency: deploy_${{ matrix.environment }}
environment:
name: ${{ matrix.environment }}
Expand All @@ -72,7 +72,8 @@ jobs:
strategy:
max-parallel: 1
matrix:
environment: [platform-test, test, production]
# environment: [platform-test, test, production]
environment: [development]
steps:
- uses: actions/checkout@v3

Expand All @@ -81,34 +82,34 @@ jobs:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}
environment_name: ${{ matrix.environment }}

update-domains:
name: Update DNS domains
if: github.ref == 'refs/heads/main'
concurrency: update_domains_${{ matrix.environment }}
environment:
name: ${{ matrix.environment }}
needs: [deploy]
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
environment: [dev-domain, prod-domain]
steps:
- uses: actions/checkout@v3
# update-domains:
# name: Update DNS domains
# if: github.ref == 'refs/heads/main'
# concurrency: update_domains_${{ matrix.environment }}
# environment:
# name: ${{ matrix.environment }}
# needs: [deploy]
# runs-on: ubuntu-latest
# strategy:
# max-parallel: 1
# matrix:
# environment: [dev-domain, prod-domain]
# steps:
# - uses: actions/checkout@v3

- uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.6.4
terraform_wrapper: false
# - uses: hashicorp/setup-terraform@v2
# with:
# terraform_version: 1.6.4
# terraform_wrapper: false

- name: Set ARM environment variables
uses: DFE-Digital/github-actions/set-arm-environment-variables@master
with:
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
# - name: Set ARM environment variables
# uses: DFE-Digital/github-actions/set-arm-environment-variables@master
# with:
# azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}

- name: Update DNS in ${{ matrix.environment }}
run: |
make ci ${{ matrix.environment }} domains-infra-apply
shell: bash
env:
TF_VAR_azure_sp_credentials_json: ${{ secrets.AZURE_CREDENTIALS }}
# - name: Update DNS in ${{ matrix.environment }}
# run: |
# make ci ${{ matrix.environment }} domains-infra-apply
# shell: bash
# env:
# TF_VAR_azure_sp_credentials_json: ${{ secrets.AZURE_CREDENTIALS }}

0 comments on commit 2746146

Please sign in to comment.