1006 test implementation

Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
Guillaume de Rouville
2021-08-13 03:01:13 +02:00
parent 82d45985a5
commit 6744045ce7
5 changed files with 95 additions and 40 deletions

View File

@@ -43,46 +43,7 @@ mkdir gcpcloudrun
### Create a basic plan
```cue title="todoapp/gcpcloudrun/source.cue"
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
}
```cue file=./tests/gcpcloudrun/source.cue title="todoapp/cue.mod/gcpcloudrun/source.cue"
```
## Set up the environment