Skip to content

Instantly share code, notes, and snippets.

@grant

grant/deploy.sh

Created Jan 27, 2021
Embed
What would you like to do?
run-workflow-function deploy.sh
# Configuration
export PROJECT_ID=$(gcloud config get-value core/project)
# Deploy Workflow
gcloud workflows deploy myFirstWorkflow \
--source=myFirstWorkflow.yaml
# Deploy (private) Function
gcloud functions deploy runWorkflowFunction \
--runtime nodejs12 \
--region us-central1 \
--entry-point runWorkflow \
--set-env-vars PROJECT_ID=$PROJECT_ID \
--trigger-http \
--no-allow-unauthenticated
# Call (private) Function
FUNCTION_URL=https://us-central1-$PROJECT_ID.cloudfunctions.net/runWorkflowFunction
curl -XPOST -H "Authorization: Bearer $(gcloud auth print-identity-token)" $FUNCTION_URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment