| # Copyright 2021 The Go Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style |
| # license that can be found in the LICENSE file. |
| # Deploy the vuln worker to Cloud Run, using Cloud Build. |
| source devtools/lib.sh || { echo "Are you at repo root?"; exit 1; } |
| # Report whether the current repo's workspace has no uncommitted files. |
| [[ $(git status --porcelain) == '' ]] |
| die "usage: $0 [-n] (dev | prod)" |
| local project=$(tfvar ${env}_project) |
| local commit=$(git rev-parse --short HEAD) |
| if ! clean_workspace; then |
| $prefix gcloud builds submit \ |
| --config deploy/worker.yaml \ |
| --substitutions SHORT_SHA=${commit}${unclean},_ENV=$env |