Skip to content

Commit 1830b38

Browse files
authored
refactor: use gcloud to deploy (#42)
* Update to gcloud * lint * Add gcloud_project * debug * force unit tests to complete * pin to gcloud and update regex tests * debug revisions * Add retries to revisions * fix test
1 parent de87a16 commit 1830b38

24 files changed

+13623
-388926
lines changed

.github/workflows/deploy-cloudrun-it.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ jobs:
7878
npm install
7979
npm run build
8080
81-
- run: sed -i "s/test-basic-yaml/${{ steps.service.outputs.service }}/" ./tests/unit/service.basic.yaml
81+
- name: Set service name in metadata YAML
82+
run: sed -i "s/test-basic-yaml/${{ steps.service.outputs.service }}/" ./tests/unit/service.basic.yaml
8283

8384
- name: Deploy Service
8485
id: deploy
@@ -114,7 +115,8 @@ jobs:
114115
npm install
115116
npm run build
116117
117-
- run: |-
118+
- name: Set service name in metadata YAML
119+
run: |-
118120
sed -i "s/run-full-yaml/${{ steps.service.outputs.service }}/" ./tests/unit/service.full.yaml
119121
120122
- name: Create service from metadata yaml
@@ -134,8 +136,9 @@ jobs:
134136
run: npm run e2e-tests
135137
env:
136138
URL: ${{ steps.deploy_1.outputs.url }}
139+
SERVICE: ${{ steps.service.outputs.service }}
137140
PARAMS: "{\"cpu\": 2,\"memory\": \"1Gi\", \"containerConcurrency\": 20}"
138-
ANNOTATIONS: "{\"run.googleapis.com/cloudsql-instances\": \"1:2:3\"}"
141+
ANNOTATIONS: "{\"run.googleapis.com/cloudsql-instances\": \"my-test-instnace\"}"
139142
LABELS: "{\"test_label\": \"test_value\"}"
140143

141144
- name: Update service with new image
@@ -152,7 +155,7 @@ jobs:
152155
URL: ${{ steps.deploy_2.outputs.url }}
153156
SERVICE: ${{ steps.service.outputs.service }}
154157
PARAMS: "{\"cpu\": 2,\"memory\": \"1Gi\", \"containerConcurrency\": 20}"
155-
ANNOTATIONS: "{\"run.googleapis.com/cloudsql-instances\": \"1:2:3\"}"
158+
ANNOTATIONS: "{\"run.googleapis.com/cloudsql-instances\": \"my-test-instnace\"}"
156159
LABELS: "{\"test_label\": \"test_value\"}"
157160
COUNT: 2
158161

@@ -192,9 +195,11 @@ jobs:
192195
run: npm run e2e-tests
193196
env:
194197
URL: ${{ steps.deploy_1.outputs.url }}
198+
SERVICE: ${{ steps.service.outputs.service }}
195199
REVISION: ${{ steps.service.outputs.service }}-001
196200

197-
- run: |-
201+
- name: Update service revision name
202+
run: |-
198203
sed -i "s/-001/-002/" ./tests/unit/service.namedrevision.yaml
199204
200205
- name: Update service with new revision name

.github/workflows/deploy-cloudrun.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: google-github-actions/setup-gcloud@master
2626
with:
2727
service_account_key: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
28-
export_default_credentials: true
28+
2929
- name: npm test
3030
run: npm run test
3131
env:

0 commit comments

Comments
 (0)