eabf1b52e5
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
37 lines
685 B
CUE
37 lines
685 B
CUE
package docker
|
|
|
|
import (
|
|
"alpha.dagger.io/dagger"
|
|
"alpha.dagger.io/random"
|
|
)
|
|
|
|
TestRegistry: {
|
|
username: dagger.#Input & {string}
|
|
secret: dagger.#Input & {dagger.#Secret}
|
|
}
|
|
|
|
TestPush: {
|
|
// Generate a random string
|
|
// Seed is used to force buildkit execution and not simply use a previous generated string.
|
|
tag: random.#String & {seed: "docker push and pull should fail"}
|
|
|
|
target: "daggerio/ci-test:\(tag.out)"
|
|
|
|
image: #ImageFromDockerfile & {
|
|
dockerfile: """
|
|
FROM alpine
|
|
RUN echo "test" > /test.txt
|
|
"""
|
|
context: ""
|
|
}
|
|
|
|
push: #Push & {
|
|
"target": target
|
|
source: image
|
|
auth: {
|
|
username: TestRegistry.username
|
|
secret: TestRegistry.secret
|
|
}
|
|
}
|
|
}
|