From 2b2751ab74d06ae198ce78d4f7d08b3abe2f07a3 Mon Sep 17 00:00:00 2001 From: Andy Price Date: Wed, 4 Dec 2024 14:41:38 +0000 Subject: [PATCH] SP-2468 - Deploy to, and smoke test the development environment on the path to live #minor --- .github/workflows/workflow_path_to_live.yml | 33 ++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow_path_to_live.yml b/.github/workflows/workflow_path_to_live.yml index 61c4570..2986e4f 100644 --- a/.github/workflows/workflow_path_to_live.yml +++ b/.github/workflows/workflow_path_to_live.yml @@ -48,11 +48,42 @@ jobs: semver_tag: ${{ needs.set_variables.outputs.semver_tag }} secrets: inherit # pragma: allowlist secret + terraform_development_environment_apply: + name: Terraform - Development - Environment - Apply + needs: + - set_variables + - docker_build_scan_push + uses: ministryofjustice/opg-github-workflows/.github/workflows/build-infrastructure-terraform.yml@v3.1.0 + with: + terraform_version: ${{ needs.set_variables.outputs.environment_terraform_version }} + terraform_directory: "./terraform/environment" + terraform_workspace: development + is_ephemeral: false + terraform_apply: true + terraform_variables: "-var=lambda_image_uri=${{ needs.docker_build_scan_push.outputs.ecr_image_uri }}" + secrets: + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AWS_ACCESS_KEY_ID_ACTIONS: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }} + AWS_SECRET_ACCESS_KEY_ACTIONS: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }} + PAGERDUTY_TOKEN: "" + + smoke_test_development: + name: Smoke test Development + uses: ./.github/workflows/_integration_tests.yml + needs: terraform_development_environment_apply + with: + data_lpa_api_url: "https://dev.lpa.api.opg.service.justice.gov.uk/v1" + working_directory: "./integration_tests" + tests_directory: "./integration_tests/v1" + specific_tests: "./v1/test_healthcheck.py" + secrets: inherit + terraform_preprod_environment_apply: name: Terraform - Preproduction - Environment - Apply needs: - set_variables - docker_build_scan_push + - smoke_test_development uses: ministryofjustice/opg-github-workflows/.github/workflows/build-infrastructure-terraform.yml@v3.1.0 with: terraform_version: ${{ needs.set_variables.outputs.environment_terraform_version }} @@ -68,7 +99,7 @@ jobs: PAGERDUTY_TOKEN: "" smoke_test_preprod: - name: Smoke test + name: Smoke test Preproduction uses: ./.github/workflows/_integration_tests.yml needs: terraform_preprod_environment_apply with: