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

Add --runtime argument to gcloud deploy in README. #1595

Merged
merged 4 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
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 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