This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/stdlib/.dagger/env/docker-build/plan/dockerfile.cue
Tom Chauveau 2e9a0d6509 Add test to universe
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-06-18 18:33:02 +02:00

58 lines
796 B
CUE

package docker
import (
"dagger.io/dagger"
"dagger.io/dagger/op"
"dagger.io/docker"
)
TestSourceBuild: dagger.#Artifact @dagger(input)
TestBuild: {
image: docker.#Build & {
source: TestSourceBuild
}
verify: #up: [
op.#Load & {
from: image
},
op.#Exec & {
always: true
args: [
"sh", "-c", """
grep -q "test" /test.txt
""",
]
},
]
}
TestSourceImageFromDockerfile: dagger.#Artifact @dagger(input)
TestImageFromDockerfile: {
image: docker.#ImageFromDockerfile & {
dockerfile: """
FROM alpine
COPY test.txt /test.txt
"""
context: TestSourceImageFromDockerfile
}
verify: #up: [
op.#Load & {
from: image
},
op.#Exec & {
always: true
args: [
"sh", "-c", """
grep -q "test" /test.txt
""",
]
},
]
}