-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_oauth_redirect.sh
executable file
·37 lines (32 loc) · 1.02 KB
/
deploy_oauth_redirect.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
set -euo pipefail
if [ -z ${SLACK_SIGNING_SECRET+x} ]; then
echo "SLACK_SIGNING_SECRET is not set as environment variable"
exit 1
fi
if [ -z ${SLACK_CLIENT_ID+x} ]; then
echo "SLACK_CLIENT_ID is not set as environment variable"
exit 1
fi
if [ -z ${SLACK_CLIENT_SECRET+x} ]; then
echo "SLACK_CLIENT_SECRET is not set as environment variable"
exit 1
fi
if [ -z ${GOOGLE_CLOUD_PROJECT+x} ]; then
echo "GOOGLE_CLOUD_PROJECT is not set as environment variable"
exit 1
fi
if [ -z ${ENCRYPTION_SECRET+x} ]; then
echo "ENCRYPTION_SECRET is not set as environment variable"
exit 1
fi
gcloud functions deploy oauth_redirect \
--project nl-kudo-box \
--runtime python39 \
--trigger-http \
--set-env-vars "SLACK_SIGNING_SECRET=${SLACK_SIGNING_SECRET}" \
--set-env-vars "SLACK_CLIENT_ID=${SLACK_CLIENT_ID}" \
--set-env-vars "SLACK_CLIENT_SECRET=${SLACK_CLIENT_SECRET}" \
--set-env-vars "GOOGLE_CLOUD_PROJECT=${GOOGLE_CLOUD_PROJECT}" \
--set-env-vars "ENCRYPTION_SECRET=${ENCRYPTION_SECRET}" \
--allow-unauthenticated