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

pass arguments to gcloud deploy #357

Merged
merged 1 commit into from
Jun 27, 2022
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
6 changes: 3 additions & 3 deletions dashboard/deploy_dashboard_gcloud
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e

if [ $# != 1 ]; then
echo Usage: $0 [project_id]
if (( $# < 1 )); then
echo Usage: $0 PROJECT_ID [options]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What options are potentially interesting here? I've never had to add anything else, so just wondering... I'm a bit worried about making this too flexible since ideally the cloud-deploy part would be very regular/consistent...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into it, I don't think any. I made some assumptions based on the names of some things but I don't think they're relevant anymore, so it's only the service account then.

false
fi

Expand All @@ -27,7 +27,7 @@ EOF
PUBSUB_FUNCTIONS="udmi_target udmi_state udmi_config udmi_reflect"
for func in $PUBSUB_FUNCTIONS; do
echo Deploying pubsub-trigger function $func...
gcloud functions deploy $func --set-env-vars GCP_PROJECT=$PROJECT --trigger-topic=$func --runtime=$RUNTIME --project=$PROJECT --source=$SOURCE &
gcloud functions deploy $func --set-env-vars GCP_PROJECT=$PROJECT --trigger-topic=$func --runtime=$RUNTIME --project=$PROJECT --source=$SOURCE "$@" &
sleep 10
done

Expand Down