Skip to content

Commit 0153497

Browse files
Make the promotion to the latest version conditional (#103)
* Make the promotion to the latest version conditional * Remove mlab-ns from old * Add dash
1 parent d1049f6 commit 0153497

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

cloudbuild/cloudbuild.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,29 @@ steps:
1717
- go test ./... -race
1818
- go test -v ./...
1919

20-
# Deployment of APIs in sandbox & staging & mlab-ns.
20+
# Deployment of APIs in sandbox & staging.
2121
- name: gcr.io/$PROJECT_ID/gcloud-jsonnet-cbif:1.18
2222
env:
2323
# Use cbif condition: only run these steps in one of these projects.
24-
- PROJECT_IN=mlab-sandbox,mlab-staging,mlab-ns
24+
- PROJECT_IN=mlab-sandbox,mlab-staging
25+
args:
26+
- cp cloudbuild/app.yaml.template app.yaml
27+
- >
28+
sed -i
29+
-e 's/{{PROJECT}}/$PROJECT_ID/g'
30+
-e 's/{{PLATFORM_PROJECT}}/$_PLATFORM_PROJECT/'
31+
-e 's/{{REDIS_ADDRESS}}/$_REDIS_ADDRESS/'
32+
app.yaml
33+
- gcloud --project $PROJECT_ID app deploy --promote app.yaml
34+
# After deploying the new service, deploy the openapi spec.
35+
- sed -i -e 's/{{PROJECT}}/$PROJECT_ID/' openapi.yaml
36+
- gcloud endpoints services deploy openapi.yaml
37+
38+
# Deployment of APIs in mlab-ns.
39+
- name: gcr.io/$PROJECT_ID/gcloud-jsonnet-cbif:1.18
40+
env:
41+
# Use cbif condition: only run these steps in one of these projects.
42+
- PROJECT_IN=mlab-ns
2543
args:
2644
- cp cloudbuild/app.yaml.template app.yaml
2745
- >

0 commit comments

Comments
 (0)