-
Notifications
You must be signed in to change notification settings - Fork 4
116 lines (107 loc) · 4.09 KB
/
continuous-deployment.yml
File metadata and controls
116 lines (107 loc) · 4.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Continuous Deployment Pipeline
on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }} #hardcoded group name causes the pipeline to get stuck
cancel-in-progress: false
jobs:
run-quality-checks:
uses: ./.github/workflows/quality-checks.yml
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
deploy-internal-dev-backend:
needs: [run-quality-checks]
uses: ./.github/workflows/deploy-backend.yml
with:
apigee_environment: internal-dev
diff_base_sha: ${{ github.event.before }}
diff_head_sha: ${{ github.sha }}
run_diff_check: true
create_mns_subscription: true
environment: dev
sub_environment: internal-dev
run-internal-dev-sandbox-tests:
# Technically the first step is not a pre-requisite - sandbox backend deployment is handled by APIM
# Stipulating this condition simply makes it more likely the environment will be ready when tests are invoked
needs: [deploy-internal-dev-backend]
uses: ./.github/workflows/run-e2e-automation-tests.yml
with:
apigee_environment: internal-dev-sandbox
environment: dev
sub_environment: internal-dev-sandbox
service_under_test: all
suite_to_run: sandbox
secrets:
APIGEE_PASSWORD: ${{ secrets.APIGEE_PASSWORD }}
APIGEE_BASIC_AUTH_TOKEN: ${{ secrets.APIGEE_BASIC_AUTH_TOKEN }}
APIGEE_OTP_KEY: ${{ secrets.APIGEE_OTP_KEY }}
CIS2_E2E_USERNAME: ${{ secrets.CIS2_E2E_USERNAME }}
STATUS_API_KEY: ${{ secrets.STATUS_API_KEY }}
run-sandbox-tests:
needs: [run-internal-dev-sandbox-tests]
uses: ./.github/workflows/run-e2e-automation-tests.yml
with:
apigee_environment: sandbox
environment: dev
sub_environment: sandbox
service_under_test: all
suite_to_run: sandbox
secrets:
APIGEE_PASSWORD: ${{ secrets.APIGEE_PASSWORD }}
APIGEE_BASIC_AUTH_TOKEN: ${{ secrets.APIGEE_BASIC_AUTH_TOKEN }}
APIGEE_OTP_KEY: ${{ secrets.APIGEE_OTP_KEY }}
CIS2_E2E_USERNAME: ${{ secrets.CIS2_E2E_USERNAME }}
STATUS_API_KEY: ${{ secrets.STATUS_API_KEY }}
run-internal-dev-tests:
needs: [deploy-internal-dev-backend]
uses: ./.github/workflows/run-e2e-automation-tests.yml
with:
apigee_environment: internal-dev
environment: dev
sub_environment: internal-dev
service_under_test: all
suite_to_run: smoke
secrets:
APIGEE_PASSWORD: ${{ secrets.APIGEE_PASSWORD }}
APIGEE_BASIC_AUTH_TOKEN: ${{ secrets.APIGEE_BASIC_AUTH_TOKEN }}
APIGEE_OTP_KEY: ${{ secrets.APIGEE_OTP_KEY }}
CIS2_E2E_USERNAME: ${{ secrets.CIS2_E2E_USERNAME }}
STATUS_API_KEY: ${{ secrets.STATUS_API_KEY }}
deploy-higher-dev-envs:
needs: [run-internal-dev-tests, deploy-internal-dev-backend]
strategy:
matrix:
sub_environment_name: [ref, internal-qa]
uses: ./.github/workflows/deploy-backend.yml
with:
apigee_environment: ${{ matrix.sub_environment_name }}
lambda_image_overrides: ${{ needs.deploy-internal-dev-backend.outputs.image_uris_json }}
run_diff_check: false
create_mns_subscription: true
environment: dev
sub_environment: ${{ matrix.sub_environment_name }}
run-higher-dev-env-tests:
needs: [deploy-higher-dev-envs]
strategy:
matrix:
sub_environment_name: [ref, internal-qa]
include:
- sub_environment_name: ref
required_test_suite: proxy_smoke
- sub_environment_name: internal-qa
required_test_suite: smoke
uses: ./.github/workflows/run-e2e-automation-tests.yml
with:
apigee_environment: ${{ matrix.sub_environment_name }}
environment: dev
sub_environment: ${{ matrix.sub_environment_name }}
service_under_test: all
suite_to_run: ${{ matrix.required_test_suite }}
secrets:
APIGEE_PASSWORD: ${{ secrets.APIGEE_PASSWORD }}
APIGEE_BASIC_AUTH_TOKEN: ${{ secrets.APIGEE_BASIC_AUTH_TOKEN }}
APIGEE_OTP_KEY: ${{ secrets.APIGEE_OTP_KEY }}
CIS2_E2E_USERNAME: ${{ secrets.CIS2_E2E_USERNAME }}
STATUS_API_KEY: ${{ secrets.STATUS_API_KEY }}