Skip to content

Commit

Permalink
Add dispatch.yaml to route autojoin API requests to the autojoin serv…
Browse files Browse the repository at this point in the history
…ice (#53)

* Add dispatch rules for custom domain
* Add production deployment for dispatch rules
  • Loading branch information
stephen-soltesz authored Nov 8, 2024
1 parent 0a5a35f commit f443e38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:
- go test ./... -race
- go test -v ./...

# Deployment of APIs in sandbox & staging.
# Deployment of API.
- name: gcr.io/$PROJECT_ID/gcloud-jsonnet-cbif:1.1
args:
- sed -i -e 's/{{PROJECT_ID}}/$PROJECT_ID/g' app.yaml
Expand All @@ -24,3 +24,11 @@ steps:
# After deploying the new service, deploy the openapi spec.
- sed -i -e 's/{{PROJECT}}/$PROJECT_ID/' -e 's/{{DEPLOYMENT}}/$PROJECT_ID/' openapi.yaml
- gcloud endpoints services deploy openapi.yaml

# Deployment of dispatch for mlab-autojoin.
# Routes requests to autojoin.measurementlab.net to the autojoin service.
- name: gcr.io/$PROJECT_ID/gcloud-jsonnet-cbif:1.1
env:
- PROJECT_IN=mlab-autojoin
args:
- gcloud --project $PROJECT_ID app deploy dispatch.yaml
7 changes: 7 additions & 0 deletions dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# A project may have up to 20 dispatch rules.
# See also: https://cloud.google.com/appengine/docs/standard/go/reference/dispatch-yaml
dispatch:
# Route /autojoin/ requests to the autojoin service.
- service: autojoin
url: "*/autojoin/*"
# All other requests are routed to their default target.

0 comments on commit f443e38

Please sign in to comment.