Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate preproduction to AKS #918

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 13 additions & 31 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,54 +87,36 @@ jobs:
message: |
AKS review app deployed to ${{ steps.deploy_v2.outputs.environment_url }}

deploy_v2_dev:
name: Deploy to development_aks environment
concurrency: deploy_v2_development
needs: [docker]
deploy_v2_nonprod:
johnake marked this conversation as resolved.
Show resolved Hide resolved
name: Deploy to ${{ matrix.environment }} environment
runs-on: ubuntu-latest
continue-on-error: true
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
environment:
name: development_aks

steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/deploy_v2
id: deploy_v2
with:
environment: development_aks
docker_image: ${{ needs.docker.outputs.docker_image }}
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
arm-access-key: ${{ secrets.ARM_ACCESS_KEY }}
- uses: ./.github/workflows/actions/smoke-test-v2
id: smoke-test
with:
environment: development_aks
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}

deploy_v2_test:
name: Deploy to test_aks environment
concurrency: deploy_v2_test
concurrency: deploy_${{ matrix.environment }}
needs: [docker]
runs-on: ubuntu-latest
continue-on-error: true
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
strategy:
max-parallel: 1
matrix:
environment: [development_aks, test_aks, preproduction_aks]
johnake marked this conversation as resolved.
Show resolved Hide resolved
environment:
name: test_aks
name: ${{ matrix.environment }}
url: ${{ steps.deploy.outputs.environment_url }}
outputs:
environment_url: ${{ steps.deploy.outputs.environment_url }}

steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/deploy_v2
id: deploy_v2
with:
environment: test_aks
environment: ${{ matrix.environment }}
docker_image: ${{ needs.docker.outputs.docker_image }}
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
arm-access-key: ${{ secrets.ARM_ACCESS_KEY }}
- uses: ./.github/workflows/actions/smoke-test-v2
id: smoke-test
with:
environment: test_aks
environment: ${{ matrix.environment }}
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}

deploy_nonprod:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/database-copy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Restore DB
strategy:
matrix:
environment: [dev, test]
environment: [dev, test, preprod]
max-parallel: 1
uses: ./.github/workflows/restore-paas-db-to-aks.yml
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/restore-paas-db-to-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
options:
- dev
- test
- preprod

env:
BACKUP_ARTIFACT_NAME: ${{ inputs.environment }}-backup
Expand Down Expand Up @@ -82,6 +83,9 @@ jobs:
test)
echo "ENVIRONMENT_AKS=test_aks" >> $GITHUB_OUTPUT
;;
preprod)
echo "ENVIRONMENT_AKS=preproduction_aks" >> $GITHUB_OUTPUT
;;
*)
echo "unknown cluster"
;;
Expand Down Expand Up @@ -124,6 +128,11 @@ jobs:
echo "cluster_name=$test_cluster_name" >> $GITHUB_ENV
echo "app_name=find-a-lost-trn-test" >> $GITHUB_ENV
;;
preproduction_aks)
echo "cluster_rg=$test_cluster_rg" >> $GITHUB_ENV
echo "cluster_name=$test_cluster_name" >> $GITHUB_ENV
echo "app_name=find-a-lost-trn-preproduction" >> $GITHUB_ENV
;;
*)
echo "unknown cluster"
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"app_environment": "preproduction",
"cluster": "test",
"enable_monitoring": false,
"file_environment": "preprod",
"namespace": "tra-test",
"azure_resource_prefix": "s189t01",
"config_short": "pp",
Expand Down