blob: a35f830258a480d5fa13174db10b73bf91832130 [file] [edit]
#!/bin/sh
# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
set -e
if [[ -z "$GITHUB_SECRET" ]]; then
echo "Must specify GITHUB_SECRET environment variable"
exit 1
fi
if [[ -z "$SENDGRID_SECRET" ]]; then
echo "Must specify SENDGRID_SECRET environment variable"
exit 1
fi
# First step is to run the build
gcloud run deploy github-webhook --port 8080 --project dart-ci \
--region us-central1 --timeout 120s \
--memory 128Mi \
--source=./ --allow-unauthenticated \
--description 'The Github label notifier service' \
--set-env-vars "GITHUB_SECRET=$GITHUB_SECRET,SENDGRID_SECRET=$SENDGRID_SECRET" \
--service-account github-label-notifier@dart-ci.iam.gserviceaccount.com