-
Notifications
You must be signed in to change notification settings - Fork 1
183 lines (178 loc) · 8.98 KB
/
cd.yaml
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: Deployment
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'dev'
- 'demo'
jobs:
deployDev:
name: Deploy to Development Environment
if: github.event.ref == 'refs/heads/dev'
uses: ./.github/workflows/rw-build-image.yaml
with:
environment: Development
secrets:
ecr-role: ${{ secrets.DEV_ECR_ROLE_TO_ASSUME }}
ecr-region: ${{ secrets.DEV_ECR_REGION }}
ecr-repo: ${{ secrets.DEV_ECR_REPO }}
sentry-dsn: ${{ vars.PHP_DSN }}
domain: 'dev.websitebuilder.service.justice.gov.uk'
env-type: ${{ vars.ENV_TYPE }}
cp-user: ${{ secrets.PACKAGIST_USER }}
cp-password: ${{ secrets.PACKAGIST_PASSWORD }}
acf-user: ${{ secrets.ACF_USER }}
acf-password: ${{ secrets.ACF_PASSWORD }}
kube-cluster: ${{ secrets.KUBE_CLUSTER }}
kube-cert: ${{ secrets.KUBE_CERT }}
kube-namespace: ${{ secrets.KUBE_NAMESPACE }}
kube-token: ${{ secrets.KUBE_TOKEN }}
wp-db-user: ${{ secrets.WORDPRESS_DB_USER }}
wp-db-host: ${{ secrets.WORDPRESS_DB_HOST }}
wp-db-name: ${{ secrets.WORDPRESS_DB_NAME }}
wp-db-password: ${{ secrets.WORDPRESS_DB_PASSWORD }}
wp-admin-email: ${{ secrets.WORDPRESS_ADMIN_EMAIL }}
wp-admin-user: ${{ secrets.WORDPRESS_ADMIN_USER }}
wp-admin-password: ${{ secrets.WORDPRESS_ADMIN_PASSWORD }}
wp-auth-key-file: ${{ secrets.WORDPRESS_AUTH_KEY_FILE }}
wp-auth-salt-file: ${{ secrets.WORDPRESS_AUTH_SALT_FILE }}
wp-loggedin-key-file: ${{ secrets.WORDPRESS_LOGGED_IN_KEY_FILE }}
wp-loggedin-salt-file: ${{ secrets.WORDPRESS_LOGGED_IN_SALT_FILE }}
wp-nonce-key-file: ${{ secrets.WORDPRESS_NONCE_KEY_FILE }}
wp-nonce-salt-file: ${{ secrets.WORDPRESS_NONCE_SALT_FILE }}
wp-secure-auth-key-file: ${{ secrets.WORDPRESS_SECURE_AUTH_KEY_FILE }}
wp-secure-auth-salt-file: ${{ secrets.WORDPRESS_SECURE_AUTH_SALT_FILE }}
s3-uploads-bucket: ${{ secrets.S3_UPLOADS_BUCKET }}
s3-uploads-region: ${{ secrets.S3_UPLOADS_REGION }}
alert-slack-webhook-url: ${{ secrets.ALERT_SLACK_WEBHOOK_URL }}
avature-feed-username: ${{ secrets.AVATURE_FEED_USERNAME }}
avature-feed-password: ${{ secrets.AVATURE_FEED_PASSWORD }}
wb-config: ${{ secrets.WB_CONFIG}}
deployDemo:
name: Deploy to Demo Environment
if: github.event.ref == 'refs/heads/demo'
uses: ./.github/workflows/rw-build-image.yaml
with:
environment: Demonstration
secrets:
ecr-role: ${{ secrets.DEMO_ECR_ROLE_TO_ASSUME }}
ecr-region: ${{ secrets.DEMO_ECR_REGION }}
ecr-repo: ${{ secrets.DEMO_ECR_REPO }}
sentry-dsn: ${{ vars.PHP_DSN }}
domain: 'demo.websitebuilder.service.justice.gov.uk'
env-type: ${{ vars.ENV_TYPE }}
cp-user: ${{ secrets.PACKAGIST_USER }}
cp-password: ${{ secrets.PACKAGIST_PASSWORD }}
acf-user: ${{ secrets.ACF_USER }}
acf-password: ${{ secrets.ACF_PASSWORD }}
kube-cluster: ${{ secrets.KUBE_CLUSTER }}
kube-cert: ${{ secrets.KUBE_CERT }}
kube-namespace: ${{ secrets.KUBE_NAMESPACE }}
kube-token: ${{ secrets.KUBE_TOKEN }}
wp-db-user: ${{ secrets.WORDPRESS_DB_USER }}
wp-db-host: ${{ secrets.WORDPRESS_DB_HOST }}
wp-db-name: ${{ secrets.WORDPRESS_DB_NAME }}
wp-db-password: ${{ secrets.WORDPRESS_DB_PASSWORD }}
wp-admin-email: ${{ secrets.WORDPRESS_ADMIN_EMAIL }}
wp-admin-user: ${{ secrets.WORDPRESS_ADMIN_USER }}
wp-admin-password: ${{ secrets.WORDPRESS_ADMIN_PASSWORD }}
wp-auth-key-file: ${{ secrets.WORDPRESS_AUTH_KEY_FILE }}
wp-auth-salt-file: ${{ secrets.WORDPRESS_AUTH_SALT_FILE }}
wp-loggedin-key-file: ${{ secrets.WORDPRESS_LOGGED_IN_KEY_FILE }}
wp-loggedin-salt-file: ${{ secrets.WORDPRESS_LOGGED_IN_SALT_FILE }}
wp-nonce-key-file: ${{ secrets.WORDPRESS_NONCE_KEY_FILE }}
wp-nonce-salt-file: ${{ secrets.WORDPRESS_NONCE_SALT_FILE }}
wp-secure-auth-key-file: ${{ secrets.WORDPRESS_SECURE_AUTH_KEY_FILE }}
wp-secure-auth-salt-file: ${{ secrets.WORDPRESS_SECURE_AUTH_SALT_FILE }}
s3-uploads-bucket: ${{ secrets.S3_UPLOADS_BUCKET }}
s3-uploads-region: ${{ secrets.S3_UPLOADS_REGION }}
alert-slack-webhook-url: ${{ secrets.ALERT_SLACK_WEBHOOK_URL }}
avature-feed-username: ${{ secrets.AVATURE_FEED_USERNAME }}
avature-feed-password: ${{ secrets.AVATURE_FEED_PASSWORD }}
wb-config: ${{ secrets.WB_CONFIG}}
deployStaging:
name: Deploy to Staging Environment
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/rw-build-image.yaml
with:
environment: Staging
secrets:
ecr-role: ${{ secrets.STAGING_ECR_ROLE_TO_ASSUME }}
ecr-region: ${{ secrets.STAGING_ECR_REGION }}
ecr-repo: ${{ secrets.STAGING_ECR_REPO }}
domain: 'staging.websitebuilder.service.justice.gov.uk'
sentry-dsn: ${{ vars.PHP_DSN }}
env-type: ${{ vars.ENV_TYPE }}
cp-user: ${{ secrets.PACKAGIST_USER }}
cp-password: ${{ secrets.PACKAGIST_PASSWORD }}
acf-user: ${{ secrets.ACF_USER }}
acf-password: ${{ secrets.ACF_PASSWORD }}
kube-cluster: ${{ secrets.KUBE_CLUSTER }}
kube-cert: ${{ secrets.KUBE_CERT }}
kube-namespace: ${{ secrets.KUBE_NAMESPACE }}
kube-token: ${{ secrets.KUBE_TOKEN }}
wp-db-user: ${{ secrets.WORDPRESS_DB_USER }}
wp-db-host: ${{ secrets.WORDPRESS_DB_HOST }}
wp-db-name: ${{ secrets.WORDPRESS_DB_NAME }}
wp-db-password: ${{ secrets.WORDPRESS_DB_PASSWORD }}
wp-admin-email: ${{ secrets.WORDPRESS_ADMIN_EMAIL }}
wp-admin-user: ${{ secrets.WORDPRESS_ADMIN_USER }}
wp-admin-password: ${{ secrets.WORDPRESS_ADMIN_PASSWORD }}
wp-auth-key-file: ${{ secrets.WORDPRESS_AUTH_KEY_FILE }}
wp-auth-salt-file: ${{ secrets.WORDPRESS_AUTH_SALT_FILE }}
wp-loggedin-key-file: ${{ secrets.WORDPRESS_LOGGED_IN_KEY_FILE }}
wp-loggedin-salt-file: ${{ secrets.WORDPRESS_LOGGED_IN_SALT_FILE }}
wp-nonce-key-file: ${{ secrets.WORDPRESS_NONCE_KEY_FILE }}
wp-nonce-salt-file: ${{ secrets.WORDPRESS_NONCE_SALT_FILE }}
wp-secure-auth-key-file: ${{ secrets.WORDPRESS_SECURE_AUTH_KEY_FILE }}
wp-secure-auth-salt-file: ${{ secrets.WORDPRESS_SECURE_AUTH_SALT_FILE }}
s3-uploads-bucket: ${{ secrets.S3_UPLOADS_BUCKET }}
s3-uploads-region: ${{ secrets.S3_UPLOADS_REGION }}
alert-slack-webhook-url: ${{ secrets.ALERT_SLACK_WEBHOOK_URL }}
avature-feed-username: ${{ secrets.AVATURE_FEED_USERNAME }}
avature-feed-password: ${{ secrets.AVATURE_FEED_PASSWORD }}
wb-config: ${{ secrets.WB_CONFIG}}
deployProd:
name: Deploy to Production Environment
needs: deployStaging
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/rw-build-image.yaml
with:
environment: Production
secrets:
ecr-role: ${{ secrets.PROD_ECR_ROLE_TO_ASSUME }}
ecr-region: ${{ secrets.PROD_ECR_REGION }}
ecr-repo: ${{ secrets.PROD_ECR_REPO }}
sentry-dsn: ${{ vars.PHP_DSN }}
domain: 'websitebuilder.service.justice.gov.uk'
env-type: ${{ vars.ENV_TYPE }}
cp-user: ${{ secrets.PACKAGIST_USER }}
cp-password: ${{ secrets.PACKAGIST_PASSWORD }}
acf-user: ${{ secrets.ACF_USER }}
acf-password: ${{ secrets.ACF_PASSWORD }}
kube-cluster: ${{ secrets.KUBE_CLUSTER }}
kube-cert: ${{ secrets.KUBE_CERT }}
kube-namespace: ${{ secrets.KUBE_NAMESPACE }}
kube-token: ${{ secrets.KUBE_TOKEN }}
wp-db-user: ${{ secrets.WORDPRESS_DB_USER }}
wp-db-host: ${{ secrets.WORDPRESS_DB_HOST }}
wp-db-name: ${{ secrets.WORDPRESS_DB_NAME }}
wp-db-password: ${{ secrets.WORDPRESS_DB_PASSWORD }}
wp-admin-email: ${{ secrets.WORDPRESS_ADMIN_EMAIL }}
wp-admin-user: ${{ secrets.WORDPRESS_ADMIN_USER }}
wp-admin-password: ${{ secrets.WORDPRESS_ADMIN_PASSWORD }}
wp-auth-key-file: ${{ secrets.WORDPRESS_AUTH_KEY_FILE }}
wp-auth-salt-file: ${{ secrets.WORDPRESS_AUTH_SALT_FILE }}
wp-loggedin-key-file: ${{ secrets.WORDPRESS_LOGGED_IN_KEY_FILE }}
wp-loggedin-salt-file: ${{ secrets.WORDPRESS_LOGGED_IN_SALT_FILE }}
wp-nonce-key-file: ${{ secrets.WORDPRESS_NONCE_KEY_FILE }}
wp-nonce-salt-file: ${{ secrets.WORDPRESS_NONCE_SALT_FILE }}
wp-secure-auth-key-file: ${{ secrets.WORDPRESS_SECURE_AUTH_KEY_FILE }}
wp-secure-auth-salt-file: ${{ secrets.WORDPRESS_SECURE_AUTH_SALT_FILE }}
s3-uploads-bucket: ${{ secrets.S3_UPLOADS_BUCKET }}
s3-uploads-region: ${{ secrets.S3_UPLOADS_REGION }}
alert-slack-webhook-url: ${{ secrets.ALERT_SLACK_WEBHOOK_URL }}
avature-feed-username: ${{ secrets.AVATURE_FEED_USERNAME }}
avature-feed-password: ${{ secrets.AVATURE_FEED_PASSWORD }}
wb-config: ${{ secrets.WB_CONFIG}}