Skip to content

Commit 52a0276

Browse files
committed
Add Artifact Registry step and workflow result to README
1 parent 682aa13 commit 52a0276

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎gcp/cloud-run/README.md‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ Run from the repository root, with a Temporal Cloud namespace and API key.
4444
--data-file=gcp/cloud-run/collector-config.yaml --project="$PROJECT_ID"
4545
```
4646

47-
2. Build and push the image (tag `REGION-docker.pkg.dev/PROJECT_ID/temporal-samples/cloud-run-worker:latest`)
48-
with `docker build -f gcp/cloud-run/Dockerfile .`.
47+
2. Create the Artifact Registry repo, then build and push the image:
48+
49+
```bash
50+
gcloud artifacts repositories create temporal-samples --repository-format=docker \
51+
--location="$REGION" --project="$PROJECT_ID"
52+
IMAGE="$REGION-docker.pkg.dev/$PROJECT_ID/temporal-samples/cloud-run-worker:latest"
53+
docker build -f gcp/cloud-run/Dockerfile -t "$IMAGE" . && docker push "$IMAGE"
54+
```
4955

5056
3. Replace the placeholders in `worker-pool.yaml`, then deploy:
5157

@@ -57,9 +63,11 @@ The service account needs `roles/monitoring.metricWriter`, `roles/telemetry.trac
5763
`roles/secretmanager.secretAccessor`. Start a workflow on task queue `cloud-run-worker`:
5864

5965
```bash
60-
temporal workflow start --type GreetingWorkflow --task-queue cloud-run-worker \
66+
temporal workflow execute --type GreetingWorkflow --task-queue cloud-run-worker \
6167
--workflow-id cloud-run-greeting --input '"Google Cloud"'
6268
```
6369

70+
It prints `Hello Google Cloud!`, confirming the deployed worker ran the task.
71+
6472
The collector does **not** batch cumulative metrics: a shutdown flush batched with a recent periodic
6573
export would collide on the same Prometheus series and be rejected as `Duplicate TimeSeries`.

0 commit comments

Comments
 (0)