Skip to content

Commit

Permalink
Add --runtime argument to gcloud deploy in README. (#1595)
Browse files Browse the repository at this point in the history
Co-authored-by: F. Hinkelmann <franziska.hinkelmann@gmail.com>
  • Loading branch information
Emily Herbert and fhinkel authored Jan 30, 2020
1 parent c7f523a commit cab0d56
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
9 changes: 6 additions & 3 deletions datastore/functions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@ Functions for your project.

1. Deploy the "get" function with an HTTP trigger:

gcloud functions deploy get --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 --trigger-http
gcloud functions deploy set --runtime [YOUR_RUNTIME] --trigger-http

1. Deploy the "del" function with an HTTP trigger:

gcloud functions deploy del --trigger-http
gcloud functions deploy del --runtime [YOUR_RUNTIME] --trigger-http

1. Call the "set" function to create a new entity:

Expand Down
9 changes: 6 additions & 3 deletions functions/helloworld/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 3 additions & 1 deletion functions/imagemagick/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions functions/pubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit cab0d56

Please sign in to comment.