Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud: Restructure and documented cache bucket #453

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions cloud
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,9 @@ function storage_withdraw() {
fi
}

# The region used to host our Cloud Functions
declare -r CLOUD_FUNCTION_REGION="us-central1"

# Deploy a Cloud Function
# Args: project name source [param_arg...]
function cloud_function_deploy() {
Expand All @@ -1285,6 +1288,7 @@ function cloud_function_deploy() {
declare -r source="$1"; shift
verbose echo " Deploying ${name@Q}"
mute gcloud functions deploy --quiet --project="$project" \
--region="$CLOUD_FUNCTION_REGION" \
--source "$source" "$name" "$@"
}

Expand Down Expand Up @@ -1313,6 +1317,7 @@ function cloud_function_withdraw() {
# --updated-publish=true|false
# --updated-topic=NAME
# --updated_urls_topic=NAME
# --cache-bucket-name=NAME
# --spool-collection-path=PATH
# --extra-cc=ADDRS
# --smtp-to-addrs=ADDRS --smtp-password-secret=NAME
Expand Down Expand Up @@ -1362,13 +1367,11 @@ function cloud_functions_env() {
[KCIDB_SMTP_USER]="[email protected]"
[KCIDB_SMTP_PASSWORD_SECRET]="$smtp_password_secret"
[KCIDB_SMTP_FROM_ADDR]="[email protected]"
[KCIDB_CACHE_BUCKET_NAME]="$cache_bucket_name"
)
if [ -n "$extra_cc" ]; then
env[KCIDB_EXTRA_CC]="$extra_cc"
fi
if [ -n "$cache_bucket_name" ]; then
env[KCIDB_CACHE_BUCKET_NAME]="$cache_bucket_name"
fi
if [ -n "$smtp_to_addrs" ]; then
env[KCIDB_SMTP_TO_ADDRS]="$smtp_to_addrs"
fi
Expand Down