62
62
service : ' ${{ env.SERVICE_NAME }}'
63
63
env_vars : |-
64
64
FOO=bar
65
- ZIP=zap
65
+ ZIP=zap\,with|separators\,and&stuff
66
66
env_vars_file : ' ./tests/fixtures/env_vars.txt'
67
67
secrets : |-
68
68
MY_SECRET=${{ vars.SECRET_NAME }}:latest
@@ -73,14 +73,33 @@ jobs:
73
73
skip_default_labels : true
74
74
flags : ' --cpu=2 --concurrency=20'
75
75
76
- - run : ' npm run e2e-tests'
76
+ - name : ' Run initial deploy tests'
77
+ run : ' npm run e2e-tests'
77
78
env :
78
79
PROJECT_ID : ${{ vars.PROJECT_ID }}
79
80
SERVICE : ' ${{ env.SERVICE_NAME }}'
80
- ENV : ' FOO=bar,ZIP=zap,TEXT_FOO=bar,TEXT_ZIP=zap'
81
- SECRET_ENV : MY_SECRET=${{ vars.SECRET_NAME }}:latest,MY_SECOND_SECRET=${{ vars.SECRET_NAME }}:1
82
- PARAMS : ' {"cpu":2, "containerConcurrency":20}'
83
- LABELS : ' {"label1":"value1", "label2":"value2"}'
81
+ ENV : |-
82
+ {
83
+ "FOO": "bar",
84
+ "ZIP": "zap,with|separators,and&stuff",
85
+ "TEXT_FOO": "bar",
86
+ "TEXT_ZIP": "zap,with|separators,and&stuff"
87
+ }
88
+ SECRET_ENV : |-
89
+ {
90
+ "MY_SECRET": "${{ vars.SECRET_NAME }}:latest",
91
+ "MY_SECOND_SECRET": "${{ vars.SECRET_NAME }}:1"
92
+ }
93
+ PARAMS : |-
94
+ {
95
+ "cpu": "2",
96
+ "containerConcurrency": "20"
97
+ }
98
+ LABELS : |-
99
+ {
100
+ "label1": "value1",
101
+ "label2": "value2"
102
+ }
84
103
85
104
- id : ' deploy-cloudrun-again'
86
105
name : ' Deploy again'
@@ -94,15 +113,41 @@ jobs:
94
113
DEF=456
95
114
secrets : /api/secrets/my-secret=${{ vars.SECRET_NAME }}:latest
96
115
97
- - run : ' npm run e2e-tests'
116
+ - name : ' Run re-deploy tests'
117
+ run : ' npm run e2e-tests'
98
118
env :
99
119
PROJECT_ID : ${{ vars.PROJECT_ID }}
100
120
SERVICE : ' ${{ env.SERVICE_NAME }}'
101
- ENV : ' FOO=bar,ZIP=zap,TEXT_FOO=bar,TEXT_ZIP=zap,ABC=123,DEF=456'
102
- SECRET_ENV : MY_SECRET=${{ vars.SECRET_NAME }}:latest,MY_SECOND_SECRET=${{ vars.SECRET_NAME }}:1
103
- SECRET_VOLUMES : /api/secrets/my-secret=${{ vars.SECRET_NAME }}:latest
104
- PARAMS : ' {"cpu":2, "containerConcurrency":20}'
105
- LABELS : ' {"label1":"value1", "label2":"value2", "commit-sha":"${{ github.sha }}", "managed-by":"github-actions"}'
121
+ ENV : |-
122
+ {
123
+ "FOO": "bar",
124
+ "ZIP": "zap,with|separators,and&stuff",
125
+ "TEXT_FOO": "bar",
126
+ "TEXT_ZIP": "zap,with|separators,and&stuff",
127
+ "ABC": "123",
128
+ "DEF": "456"
129
+ }
130
+ SECRET_ENV : |-
131
+ {
132
+ "MY_SECRET": "${{ vars.SECRET_NAME }}:latest",
133
+ "MY_SECOND_SECRET": "${{ vars.SECRET_NAME }}:1"
134
+ }
135
+ SECRET_VOLUMES : |-
136
+ {
137
+ "/api/secrets/my-secret": "${{ vars.SECRET_NAME }}:latest"
138
+ }
139
+ PARAMS : |-
140
+ {
141
+ "cpu": "2",
142
+ "containerConcurrency": "20"
143
+ }
144
+ LABELS : |-
145
+ {
146
+ "label1": "value1",
147
+ "label2": "value2",
148
+ "commit-sha": "${{ github.sha }}",
149
+ "managed-by": "github-actions"
150
+ }
106
151
REVISION_COUNT : 2
107
152
108
153
metadata :
@@ -137,13 +182,25 @@ jobs:
137
182
with :
138
183
metadata : ' ./tests/unit/service.yaml'
139
184
140
- - run : ' npm run e2e-tests'
185
+ - name : ' Run initial deploy tests'
186
+ run : ' npm run e2e-tests'
141
187
env :
142
188
PROJECT_ID : ' ${{ vars.PROJECT_ID }}'
143
189
SERVICE : ' ${{ env.SERVICE_NAME }}'
144
- PARAMS : ' {"cpu":2, "memory":"1Gi", "containerConcurrency":20}'
145
- ANNOTATIONS : ' {"run.googleapis.com/cloudsql-instances":"test-project:us-central1:my-test-instance"}'
146
- LABELS : ' {"test_label":"test_value"}'
190
+ PARAMS : |-
191
+ {
192
+ "cpu": "2",
193
+ "memory": "1Gi",
194
+ "containerConcurrency": "20"
195
+ }
196
+ ANNOTATIONS : |-
197
+ {
198
+ "run.googleapis.com/cloudsql-instances": "test-project:us-central1:my-test-instance"
199
+ }
200
+ LABELS : |-
201
+ {
202
+ "test_label": "test_value"
203
+ }
147
204
148
205
- id : ' deploy-cloudrun-again'
149
206
name : ' Deploy again'
@@ -152,10 +209,19 @@ jobs:
152
209
image : ' gcr.io/cloudrun/hello'
153
210
service : ' ${{ env.SERVICE_NAME }}'
154
211
155
- - run : ' npm run e2e-tests' # Check that config isn't overwritten
212
+ - name : ' Run re-deploy tests'
213
+ run : ' npm run e2e-tests' # Check that config isn't overwritten
156
214
env :
157
215
PROJECT_ID : ' ${{ vars.PROJECT_ID }}'
158
216
SERVICE : ' ${{ env.SERVICE_NAME }}'
159
- PARAMS : ' {"cpu":2, "memory":"1Gi", "containerConcurrency":20}'
160
- ANNOTATIONS : ' {"run.googleapis.com/cloudsql-instances":"test-project:us-central1:my-test-instance"}'
217
+ PARAMS : |-
218
+ {
219
+ "cpu": "2",
220
+ "memory": "1Gi",
221
+ "containerConcurrency": "20"
222
+ }
223
+ ANNOTATIONS : |-
224
+ {
225
+ "run.googleapis.com/cloudsql-instances": "test-project:us-central1:my-test-instance"
226
+ }
161
227
REVISION_COUNT : 2
0 commit comments