From ed2b146d7feec6339d224780ae987b5df268b1e7 Mon Sep 17 00:00:00 2001 From: Emily Herbert Date: Fri, 17 Jan 2020 17:52:44 -0500 Subject: [PATCH 1/3] Add --runtime argument to gcloud deploy in README. --- datastore/functions/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datastore/functions/README.md b/datastore/functions/README.md index 530a9881fe..6e8f23c199 100644 --- a/datastore/functions/README.md +++ b/datastore/functions/README.md @@ -25,15 +25,15 @@ Functions for your project. 1. Deploy the "get" function with an HTTP trigger: - gcloud functions deploy get --trigger-http + gcloud functions deploy get --runtime nodejs8 --trigger-http 1. Deploy the "set" function with an HTTP trigger: - gcloud functions deploy set --trigger-http + gcloud functions deploy set --runtime nodejs8 --trigger-http 1. Deploy the "del" function with an HTTP trigger: - gcloud functions deploy del --trigger-http + gcloud functions deploy del --runtime nodejs8 --trigger-http 1. Call the "set" function to create a new entity: From 408b53c25c7414aed963a11cf3f1547df2a86892 Mon Sep 17 00:00:00 2001 From: emilyaherbert Date: Sun, 26 Jan 2020 14:07:17 -0500 Subject: [PATCH 2/3] Updating --deploy flags in READMEs. --- datastore/functions/README.md | 9 ++++++--- functions/helloworld/README.md | 9 ++++++--- functions/imagemagick/README.md | 4 +++- functions/pubsub/README.md | 7 +++++-- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/datastore/functions/README.md b/datastore/functions/README.md index 6e8f23c199..39aaa45fd7 100644 --- a/datastore/functions/README.md +++ b/datastore/functions/README.md @@ -25,15 +25,18 @@ Functions for your project. 1. Deploy the "get" function with an HTTP trigger: - gcloud functions deploy get --runtime nodejs8 --trigger-http + gcloud functions deploy get --runtime [YOUR_RUNTIME} --trigger-http + + * Replace `[YOUR_RUNTIME]` with the name of the runtime you are using. For a complete list, + see the [gcloud reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). 1. Deploy the "set" function with an HTTP trigger: - gcloud functions deploy set --runtime nodejs8 --trigger-http + gcloud functions deploy set --runtime [YOUR_RUNTIME} --trigger-http 1. Deploy the "del" function with an HTTP trigger: - gcloud functions deploy del --runtime nodejs8 --trigger-http + gcloud functions deploy del --runtime [YOUR_RUNTIME} --trigger-http 1. Call the "set" function to create a new entity: diff --git a/functions/helloworld/README.md b/functions/helloworld/README.md index 81d14c517c..2e31f723a0 100644 --- a/functions/helloworld/README.md +++ b/functions/helloworld/README.md @@ -17,11 +17,14 @@ See the [Cloud Functions Hello World tutorial][tutorial]. **Note:** in order for the tests to run properly, you'll have to deploy some of the sample functions: ``` -gcloud functions deploy helloHttp --runtime nodejs8 --trigger-http -gcloud functions deploy helloPubSub --trigger-topic $FUNCTIONS_TOPIC --runtime nodejs8 -gcloud functions deploy helloGCS --runtime nodejs8 --trigger-resource $FUNCTIONS_DELETABLE_BUCKET --trigger-event providers/cloud.storage/eventTypes/object.change +gcloud functions deploy helloHttp --runtime [YOUR_RUNTIME] --trigger-http +gcloud functions deploy helloPubSub --trigger-topic $FUNCTIONS_TOPIC --runtime [YOUR_RUNTIME] +gcloud functions deploy helloGCS --runtime [YOUR_RUNTIME] --trigger-resource $FUNCTIONS_DELETABLE_BUCKET --trigger-event providers/cloud.storage/eventTypes/object.change ``` +* Replace `[YOUR_RUNTIME]` with the name of the runtime you are using. For a +complete list, see the [gcloud reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + ## Run the tests 1. Read and follow the [prerequisites](../../../../#prerequisites). diff --git a/functions/imagemagick/README.md b/functions/imagemagick/README.md index 2bf7aa0f59..cb086b55ee 100644 --- a/functions/imagemagick/README.md +++ b/functions/imagemagick/README.md @@ -35,8 +35,10 @@ Functions for your project. 1. Deploy the `blurOffensiveImages` function with a Storage trigger: - gcloud functions deploy blurOffensiveImages --trigger-bucket=YOUR_INPUT_BUCKET_NAME --set-env-vars BLURRED_BUCKET_NAME=YOUR_OUTPUT_BUCKET_NAME + gcloud functions deploy blurOffensiveImages --runtime YOUR_RUNTIME --trigger-bucket=YOUR_INPUT_BUCKET_NAME --set-env-vars BLURRED_BUCKET_NAME=YOUR_OUTPUT_BUCKET_NAME + * Replace `YOUR_RUNTIME` with the name of the runtime you are using. For a + complete list, see the [gcloud reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). * Replace `YOUR_INPUT_BUCKET_NAME` and `YOUR_OUTPUT_BUCKET_NAME` with the names of the respective Cloud Storage Buckets you created earlier. 1. Upload an offensive image to the Storage bucket, such as this image of diff --git a/functions/pubsub/README.md b/functions/pubsub/README.md index 538e557ea5..0ba6515c33 100644 --- a/functions/pubsub/README.md +++ b/functions/pubsub/README.md @@ -28,11 +28,14 @@ can skip this step): 1. Deploy the `publish` function with an HTTP trigger: - gcloud functions deploy publish --trigger-http + gcloud functions deploy publish --trigger-http --runtime YOUR_RUNTIME + + * Replace `YOUR_RUNTIME` with the name of the runtime you are using. For a + complete list, see the [gcloud reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). 1. Deploy the `subscribe` function with the Pub/Sub topic as a trigger: - gcloud functions deploy subscribe --trigger-topic YOUR_TOPIC_NAME + gcloud functions deploy subscribe --trigger-topic YOUR_TOPIC_NAME --runtime YOUR_RUNTIME * Replace `YOUR_TOPIC_NAME` with the name of your Pub/Sub Topic. From 9f4f7a3d61c738ea0dd6ae112efaa3ba817541c9 Mon Sep 17 00:00:00 2001 From: Emily Herbert Date: Sun, 26 Jan 2020 14:09:21 -0500 Subject: [PATCH 3/3] Update README.md --- datastore/functions/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datastore/functions/README.md b/datastore/functions/README.md index 39aaa45fd7..333817fbc4 100644 --- a/datastore/functions/README.md +++ b/datastore/functions/README.md @@ -25,18 +25,18 @@ Functions for your project. 1. Deploy the "get" function with an HTTP trigger: - gcloud functions deploy get --runtime [YOUR_RUNTIME} --trigger-http + gcloud functions deploy get --runtime [YOUR_RUNTIME] --trigger-http * Replace `[YOUR_RUNTIME]` with the name of the runtime you are using. For a complete list, see the [gcloud reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). 1. Deploy the "set" function with an HTTP trigger: - gcloud functions deploy set --runtime [YOUR_RUNTIME} --trigger-http + gcloud functions deploy set --runtime [YOUR_RUNTIME] --trigger-http 1. Deploy the "del" function with an HTTP trigger: - gcloud functions deploy del --runtime [YOUR_RUNTIME} --trigger-http + gcloud functions deploy del --runtime [YOUR_RUNTIME] --trigger-http 1. Call the "set" function to create a new entity: