Move tests plan from dagger dir to universe

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-06-24 21:01:17 +02:00
parent 36cf20ae2d
commit c99e39ec9c
69 changed files with 215 additions and 166 deletions

View File

@@ -1,86 +0,0 @@
package main
import (
"alpha.dagger.io/gcp"
"alpha.dagger.io/gcp/gcr"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/random"
)
TestConfig: gcpConfig: gcp.#Config
TestGCR: {
suffix: random.#String & {
seed: ""
}
repository: "gcr.io/dagger-ci/test"
tag: "test-gcr-\(suffix.out)"
creds: gcr.#Credentials & {
config: TestConfig.gcpConfig
}
push: {
ref: "\(repository):\(tag)"
#up: [
op.#DockerBuild & {
dockerfile: """
FROM alpine
RUN echo \(suffix.out) > /test
"""
},
op.#DockerLogin & {
target: repository
username: creds.username
secret: creds.secret
},
op.#PushContainer & {
"ref": ref
},
]
}
pull: #up: [
op.#DockerLogin & {
target: push.ref
username: creds.username
secret: creds.secret
},
op.#FetchContainer & {
ref: push.ref
},
]
verify: #up: [
op.#Load & {
from: pull
},
op.#Exec & {
always: true
args: [
"sh", "-c", "test $(cat test) = \(suffix.out)",
]
},
]
verifyBuild: #up: [
op.#DockerLogin & {
target: push.ref
username: creds.username
secret: creds.secret
},
op.#DockerBuild & {
dockerfile: #"""
FROM \#(push.ref)
RUN test $(cat test) = \#(suffix.out)
"""#
},
]
}

View File

@@ -1,5 +1,6 @@
plan:
module: .dagger/env/google-gcr/plan
module: ./gcp/gcr/
package: ./tests
name: google-gcr
inputs:
TestConfig.gcpConfig.project:
@@ -23,8 +24,8 @@ sops:
ZXd6Qmd1YUtxMnVTVkYybWgrV3pVK2MKowMeOZU3j3BxERT0DwhQYCGUDBK6gCdo
WByubiBATdsb7h7ytCC4HutWppynK4MpU+Ya9NP83AZuXo+Wa2u6aQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2021-06-15T16:26:26Z"
mac: ENC[AES256_GCM,data:/ZsuT9I5KMWGWc6Kg8jDxiHGhaLd0aGSRv2U4LKLr0LIYQrgmkTRrWSWmaU0QDKSrd+ovVDvg4KhGtGeKHENWp64zWM0I+icdYMByL7qGj8tSPmll4u7SjOIOEzpWHjLVAC+JPD1fpBo4WIwlfDjW1yjFulmxYb4utDLsDuaEH8=,iv:xWrFWD5fkmKA0dbIIiRNOp8mGRKtDX+1BInXJuKjRDE=,tag:Jqeujum1JS1ONt3kV7bvRA==,type:str]
lastmodified: "2021-06-24T16:22:49Z"
mac: ENC[AES256_GCM,data:8VyOUX7cwS6VCrLJi1luMag+vgh9WA0nxi3WqNMpI+w//SVHVtYaZ0wnzof+yictU0+PECwGFWS0ircpmLvLDUGENv2T3fCNgQj4x3TnYRdgHpd1na2XSzc/J1+uWP1FyYBR/ipvY6LnDIY4u7IWpjGNcSs+Iq+gm3S4Hc2e/Eo=,iv:UaYq9P0Y7MvW3DucgpBgc3n/n7vo+itaMhz1umIfOYI=,tag:j1suX3zEBSdRzsDexXNBVA==,type:str]
pgp: []
encrypted_suffix: secret
version: 3.7.1