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/tests/stdlib/docker/run/simple/simple.cue
Tom Chauveau 27a60d3cdf Add tests for docker.#Run
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-05-27 18:15:36 +02:00

36 lines
620 B
CUE

package docker
import (
"dagger.io/docker"
"dagger.io/dagger"
"dagger.io/dagger/op"
"dagger.io/alpine"
)
// Run with --input-file key=$HOME/.ssh/<your private server key>
key: dagger.#Artifact
TestRun: {
random: {
string
#up: [
op.#Load & {from: alpine.#Image},
op.#Exec & {
always: true
args: ["sh", "-c", "cat /dev/urandom | tr -dc 'a-z' | fold -w 10 | head -n 1 | tr -d '\n' > /rand"]
},
op.#Export & {
source: "/rand"
},
]
}
run: docker.#Run & {
host: "143.198.64.230"
ref: "nginx:alpine"
user: "root"
name: "daggerci-test-simple-\(random)"
"key": key
}
}