Skip to content

Commit 9d2ef83

Browse files
committed
Attempt to integrate e2e with deploying the backend
1 parent 930e0d3 commit 9d2ef83

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

.github/workflows/continuous-deployment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ jobs:
99
deploy_all:
1010
strategy:
1111
matrix:
12-
sub_environment_name: [internal-dev, ref, int]
12+
sub_environment_name:
13+
[internal-dev, internal-dev-sandbox, sandbox, ref, int]
1314
uses: ./.github/workflows/deploy-backend.yml
1415
with:
1516
apigee_environment: ${{ matrix.sub_environment_name }}

.github/workflows/deploy-backend.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ on:
2323
description: Select the Apigee proxy environment
2424
options:
2525
- internal-dev
26+
- internal-dev-sandbox
27+
- sandbox
2628
- int
2729
- ref
2830
- prod
@@ -44,6 +46,7 @@ on:
4446

4547
env: # Sonarcloud - do not allow direct usage of untrusted data
4648
APIGEE_ENVIRONMENT: ${{ inputs.apigee_environment }}
49+
BACKEND_REQUIRED: ${{ !(inputs.apigee_environment == 'internal-dev-sandbox' || inputs.apigee_environment == 'sandbox') }}
4750
ENVIRONMENT: ${{ inputs.environment }}
4851
SUB_ENVIRONMENT: ${{ inputs.sub_environment }}
4952

@@ -53,6 +56,7 @@ permissions:
5356

5457
jobs:
5558
terraform-plan:
59+
if: ${{ env.BACKEND_REQUIRED == 'true' }}
5660
runs-on: ubuntu-latest
5761
environment:
5862
name: ${{ inputs.environment }}
@@ -86,6 +90,7 @@ jobs:
8690
path: terraform/tfplan
8791

8892
terraform-apply:
93+
if: ${{ env.BACKEND_REQUIRED == 'true' }}
8994
needs: terraform-plan
9095
runs-on: ubuntu-latest
9196
environment:
@@ -143,7 +148,9 @@ jobs:
143148
echo "Subscribing SQS to MNS for notifications..."
144149
make subscribe
145150
146-
# Need steps for e2e tests: VED-812
147-
# Will need to wait for API and ensure proxy is deployed with same commit ID as proxy pipelines
148-
# will be running and deploying at the same time in Azure
149-
# may need a variable for different commands as we only run certain tests in different environments
151+
run-e2e-tests:
152+
uses: ./.github/workflows/run-e2e-tests.yml
153+
with:
154+
apigee_environment: ${{ inputs.apigee_environment }}
155+
environment: ${{ inputs.environment }}
156+
sub_environment: ${{ inputs.sub_environment }}

.github/workflows/pr-deploy-and-test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ on:
55
types: [opened, synchronize, reopened]
66

77
jobs:
8-
deploy-pr-env:
8+
deploy-pr-envs:
9+
strategy:
10+
matrix:
11+
apigee_environment_name: [internal-dev, internal-dev-sandbox]
912
uses: ./.github/workflows/deploy-backend.yml
1013
with:
11-
apigee_environment: internal-dev
14+
apigee_environment: ${{ matrix.apigee_environment_name }}
1215
create_mns_subscription: true
1316
environment: dev
1417
sub_environment: pr-${{github.event.pull_request.number}}

.github/workflows/run-e2e-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ on:
1919
description: Select the Apigee proxy environment
2020
options:
2121
- internal-dev
22+
- internal-dev-sandbox
23+
- sandbox
2224
- int
2325
- ref
2426
- prod
@@ -173,6 +175,7 @@ jobs:
173175
echo "::add-mask::$token"
174176
echo "APIGEE_ACCESS_TOKEN=$token" >> $GITHUB_ENV
175177
178+
# Consider removing - todo
176179
- name: Run proxy deployment e2e test suite
177180
working-directory: e2e
178181
run: poetry run python -m unittest test_deployment

0 commit comments

Comments
 (0)