6262 service : ' ${{ env.SERVICE_NAME }}'
6363 env_vars : |-
6464 FOO=bar
65- ZIP=zap
65+ ZIP=zap\,with|separators\,and&stuff
6666 env_vars_file : ' ./tests/fixtures/env_vars.txt'
6767 secrets : |-
6868 MY_SECRET=${{ vars.SECRET_NAME }}:latest
@@ -73,14 +73,33 @@ jobs:
7373 skip_default_labels : true
7474 flags : ' --cpu=2 --concurrency=20'
7575
76- - run : ' npm run e2e-tests'
76+ - name : ' Run initial deploy tests'
77+ run : ' npm run e2e-tests'
7778 env :
7879 PROJECT_ID : ${{ vars.PROJECT_ID }}
7980 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+ }
84103
85104 - id : ' deploy-cloudrun-again'
86105 name : ' Deploy again'
@@ -94,15 +113,41 @@ jobs:
94113 DEF=456
95114 secrets : /api/secrets/my-secret=${{ vars.SECRET_NAME }}:latest
96115
97- - run : ' npm run e2e-tests'
116+ - name : ' Run re-deploy tests'
117+ run : ' npm run e2e-tests'
98118 env :
99119 PROJECT_ID : ${{ vars.PROJECT_ID }}
100120 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+ }
106151 REVISION_COUNT : 2
107152
108153 metadata :
@@ -137,13 +182,25 @@ jobs:
137182 with :
138183 metadata : ' ./tests/unit/service.yaml'
139184
140- - run : ' npm run e2e-tests'
185+ - name : ' Run initial deploy tests'
186+ run : ' npm run e2e-tests'
141187 env :
142188 PROJECT_ID : ' ${{ vars.PROJECT_ID }}'
143189 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+ }
147204
148205 - id : ' deploy-cloudrun-again'
149206 name : ' Deploy again'
@@ -152,10 +209,19 @@ jobs:
152209 image : ' gcr.io/cloudrun/hello'
153210 service : ' ${{ env.SERVICE_NAME }}'
154211
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
156214 env :
157215 PROJECT_ID : ' ${{ vars.PROJECT_ID }}'
158216 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+ }
161227 REVISION_COUNT : 2
0 commit comments