Skip to content

Commit fba9f6c

Browse files
committed
Small improvements to the Google Cloud Function guides
1 parent 7ec531d commit fba9f6c

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

docs/src/main/asciidoc/funqy-gcp-functions.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ You will have a single JAR inside the `target/deployment` repository that contai
147147
Then you will be able to use `gcloud` to deploy your function to Google Cloud.
148148
The `gcloud` command will be different depending on which event triggers your function.
149149

150-
NOTE: We will use the Java 17 runtime but you can switch to the Java 21 runtime by using `--runtime=java21` instead of `--runtime=java17` on the deploy commands.
150+
NOTE: We will use the Java 21 runtime, but you can switch to the Java 17 runtime by using `--runtime=java17` instead of `--runtime=java21` on the deploy commands.
151151

152152
[WARNING]
153153
====
@@ -168,7 +168,7 @@ Use this command to deploy to Google Cloud Functions:
168168
----
169169
gcloud functions deploy quarkus-example-funky-pubsub \
170170
--entry-point=io.quarkus.funqy.gcp.functions.FunqyBackgroundFunction \
171-
--runtime=java17 --trigger-resource hello_topic --trigger-event google.pubsub.topic.publish \
171+
--runtime=java21 --trigger-resource hello_topic --trigger-event google.pubsub.topic.publish \
172172
--source=target/deployment
173173
----
174174

@@ -205,7 +205,7 @@ Then, use this command to deploy to Google Cloud Functions:
205205
----
206206
gcloud functions deploy quarkus-example-funky-storage \
207207
--entry-point=io.quarkus.funqy.gcp.functions.FunqyBackgroundFunction \
208-
--runtime=java17 --trigger-resource quarkus-hello --trigger-event google.storage.object.finalize \
208+
--runtime=java21 --trigger-resource quarkus-hello --trigger-event google.storage.object.finalize \
209209
--source=target/deployment
210210
----
211211

@@ -246,7 +246,7 @@ Then, use this command to deploy to Google Cloud Functions:
246246
----
247247
gcloud functions deploy quarkus-example-cloud-event --gen2 \
248248
--entry-point=io.quarkus.funqy.gcp.functions.FunqyCloudEventsFunction \
249-
--runtime=java17 --trigger-bucket=example-cloud-event --source=target/deployment
249+
--runtime=java21 --trigger-bucket=example-cloud-event --source=target/deployment
250250
----
251251

252252
[IMPORTANT]
@@ -371,7 +371,7 @@ This will call your cloud events function with an event on the `"MY_FILE.txt` fi
371371

372372
Quarkus provides built-in support for testing your Funqy Google Cloud functions via the `quarkus-test-google-cloud-functions` dependency.
373373

374-
To use it, you must add the following test dependency in your `pom.xml`.
374+
To use it, you must add the following test dependencies in your `pom.xml`.
375375

376376
[source,xml]
377377
----
@@ -380,6 +380,11 @@ To use it, you must add the following test dependency in your `pom.xml`.
380380
<artifactId>quarkus-test-google-cloud-functions</artifactId>
381381
<scope>test</scope>
382382
</dependency>
383+
<dependency>
384+
<groupId>io.rest-assured</groupId>
385+
<artifactId>rest-assured</artifactId>
386+
<scope>test</scope>
387+
</dependency>
383388
----
384389

385390
This extension provides a `@WithFunction` annotation that can be used to annotate `@QuarkusTest` test cases to start a Cloud Function invoker before you test cases and stop it at the end.

docs/src/main/asciidoc/gcp-functions-http.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ The result of the previous command is a single JAR file inside the `target/deplo
162162

163163
Then you will be able to use `gcloud` to deploy your function to Google Cloud.
164164

165-
NOTE: We will use the Java 17 runtime but you can switch to the Java 21 runtime by using `--runtime=java21` instead of `--runtime=java17` on the deploy commands.
165+
NOTE: We will use the Java 21 runtime, but you can switch to the Java 17 runtime by using `--runtime=java17` instead of `--runtime=java21` on the deploy commands.
166166

167167
[source,bash]
168168
----
169169
gcloud functions deploy quarkus-example-http \
170170
--entry-point=io.quarkus.gcp.functions.http.QuarkusHttpFunction \
171-
--runtime=java17 --trigger-http --allow-unauthenticated --source=target/deployment
171+
--runtime=java21 --trigger-http --allow-unauthenticated --source=target/deployment
172172
----
173173

174174
[IMPORTANT]

docs/src/main/asciidoc/gcp-functions.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ The result of the previous command is a single JAR file inside the `target/deplo
242242
Then you will be able to use `gcloud` to deploy your function to Google Cloud.
243243
The `gcloud` command will be different depending on which event triggers your function.
244244

245-
NOTE: We will use the Java 17 runtime but you can switch to the Java 21 runtime by using `--runtime=java21` instead of `--runtime=java17` on the deploy commands.
245+
NOTE: We will use the Java 21 runtime but you can switch to the Java 17 runtime by using `--runtime=java17` instead of `--runtime=java21` on the deploy commands.
246246

247247
[WARNING]
248248
====
@@ -262,7 +262,7 @@ This is an example command to deploy your `HttpFunction` to Google Cloud:
262262
----
263263
gcloud functions deploy quarkus-example-http \
264264
--entry-point=io.quarkus.gcp.functions.QuarkusHttpFunction \
265-
--runtime=java17 --trigger-http --allow-unauthenticated --source=target/deployment
265+
--runtime=java21 --trigger-http --allow-unauthenticated --source=target/deployment
266266
----
267267

268268
[IMPORTANT]
@@ -289,7 +289,7 @@ it needs to use `--trigger-event google.storage.object.finalize` and the `--trig
289289
gcloud functions deploy quarkus-example-storage \
290290
--entry-point=io.quarkus.gcp.functions.QuarkusBackgroundFunction \
291291
--trigger-resource quarkus-hello --trigger-event google.storage.object.finalize \
292-
--runtime=java17 --source=target/deployment
292+
--runtime=java21 --source=target/deployment
293293
----
294294

295295
[IMPORTANT]
@@ -315,7 +315,7 @@ it needs to use `--trigger-event google.pubsub.topic.publish` and the `--trigger
315315
----
316316
gcloud functions deploy quarkus-example-pubsub \
317317
--entry-point=io.quarkus.gcp.functions.QuarkusBackgroundFunction \
318-
--runtime=java17 --trigger-resource hello_topic --trigger-event google.pubsub.topic.publish --source=target/deployment
318+
--runtime=java21 --trigger-resource hello_topic --trigger-event google.pubsub.topic.publish --source=target/deployment
319319
----
320320

321321
[IMPORTANT]
@@ -341,7 +341,7 @@ it needs to use `--trigger-bucket` parameter with the name of a previously creat
341341
----
342342
gcloud functions deploy quarkus-example-cloud-event --gen2 \
343343
--entry-point=io.quarkus.gcp.functions.QuarkusCloudEventsFunction \
344-
--runtime=java17 --trigger-bucket=example-cloud-event --source=target/deployment
344+
--runtime=java21 --trigger-bucket=example-cloud-event --source=target/deployment
345345
----
346346

347347
[IMPORTANT]
@@ -485,6 +485,11 @@ To use it, you must add the following test dependency in your `pom.xml`.
485485
<artifactId>quarkus-test-google-cloud-functions</artifactId>
486486
<scope>test</scope>
487487
</dependency>
488+
<dependency>
489+
<groupId>io.rest-assured</groupId>
490+
<artifactId>rest-assured</artifactId>
491+
<scope>test</scope>
492+
</dependency>
488493
----
489494

490495
This extension provides a `@WithFunction` annotation that can be used to annotate `@QuarkusTest` test cases to start a Cloud Function invoker before you test cases and stop it at the end.

0 commit comments

Comments
 (0)