ebe26a90ca
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
21 lines
331 B
CUE
21 lines
331 B
CUE
package testing
|
|
|
|
import (
|
|
"dagger.io/alpine"
|
|
"dagger.io/dagger/op"
|
|
)
|
|
|
|
// Generate a random number
|
|
random: {
|
|
string
|
|
#up: [
|
|
op.#Load & {from: alpine.#Image},
|
|
op.#Exec & {
|
|
args: ["sh", "-c", "cat /dev/urandom | tr -dc 'a-z' | fold -w 10 | head -n 1 | tr -d '\n' > /rand"]
|
|
},
|
|
op.#Export & {
|
|
source: "/rand"
|
|
},
|
|
]
|
|
}
|