1006 test implementation
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
39
docs/learn/tests/gcpcloudrun/source.cue
Normal file
39
docs/learn/tests/gcpcloudrun/source.cue
Normal file
@@ -0,0 +1,39 @@
|
||||
package gcpcloudrun
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/dagger"
|
||||
"alpha.dagger.io/docker"
|
||||
"alpha.dagger.io/gcp"
|
||||
"alpha.dagger.io/gcp/cloudrun"
|
||||
"alpha.dagger.io/gcp/gcr"
|
||||
)
|
||||
|
||||
// Source code of the sample application
|
||||
src: dagger.#Artifact & dagger.#Input
|
||||
|
||||
// GCR full image name
|
||||
imageRef: string & dagger.#Input
|
||||
|
||||
image: docker.#Build & {
|
||||
source: src
|
||||
}
|
||||
|
||||
gcpConfig: gcp.#Config
|
||||
|
||||
creds: gcr.#Credentials & {
|
||||
config: gcpConfig
|
||||
}
|
||||
|
||||
push: docker.#Push & {
|
||||
target: imageRef
|
||||
source: image
|
||||
auth: {
|
||||
username: creds.username
|
||||
secret: creds.secret
|
||||
}
|
||||
}
|
||||
|
||||
deploy: cloudrun.#Service & {
|
||||
config: gcpConfig
|
||||
image: push.ref
|
||||
}
|
Reference in New Issue
Block a user