Update Cloud Run docs

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>
This commit is contained in:
Tihomir Jovicic
2021-07-05 12:40:45 +02:00
parent 104928f062
commit 31714de4e3
3 changed files with 99 additions and 35 deletions

View File

@@ -10,7 +10,7 @@ import (
// GCP Config
config: gcp.#Config
// service name
// Cloud Run service name
name: string @dagger(input)
// GCR image ref
@@ -19,6 +19,9 @@ import (
// Cloud Run platform
platform: *"managed" | string @dagger(input)
// Cloud Run service exposed port
port: *"80" | string @dagger(input)
#up: [
op.#Load & {
from: gcp.#GCloud & {
@@ -35,7 +38,7 @@ import (
"pipefail",
"-c",
#"""
gcloud run deploy "$SERVICE_NAME" --image "$IMAGE" --region "$REGION" --platform "$PLATFORM" --allow-unauthenticated
gcloud run deploy "$SERVICE_NAME" --image "$IMAGE" --region "$REGION" --port "$PORT" --platform "$PLATFORM" --allow-unauthenticated
"""#,
]
env: {
@@ -43,6 +46,7 @@ import (
PLATFORM: platform
REGION: config.region
IMAGE: image
PORT: port
}
},
]

View File

@@ -9,6 +9,6 @@ TestConfig: gcpConfig: gcp.#Config
TestCloudRun: deploy: cloudrun.#Service & {
config: TestConfig.gcpConfig
name: "cloudrun-test"
image: "gcr.io/dagger-ci/cloudrun-test:latest"
name: "todoapp"
image: "gcr.io/dagger-ci/todoapp:latest"
}