Jonathan Amsterdam | 711971b | 2022-03-25 08:00:54 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copyright 2022 The Go Authors. All rights reserved. |
| 4 | # Use of this source code is governed by a BSD-style |
| 5 | # license that can be found in the LICENSE file. |
| 6 | |
| 7 | # Start the cloud run proxy pointing at a worker. |
| 8 | |
| 9 | # To install the proxy: |
| 10 | # go install github.com/GoogleCloudPlatform/cloud-run-proxy@latest |
| 11 | |
| 12 | set -e |
| 13 | |
| 14 | source devtools/lib.sh || { echo "Are you at repo root?"; exit 1; } |
| 15 | |
| 16 | env=$1 |
| 17 | |
Jonathan Amsterdam | 682b022 | 2022-04-21 18:13:44 -0400 | [diff] [blame] | 18 | case $env in |
| 19 | dev|prod);; |
| 20 | *) die "usage: $0 (dev | prod)" |
| 21 | esac |
| 22 | |
Jonathan Amsterdam | 711971b | 2022-03-25 08:00:54 -0400 | [diff] [blame] | 23 | cloud-run-proxy -host $(worker_url $env) -token $(impersonation_token $env) |