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/os-container/plan/main.cue
Solomon Hykes d7a805f42b stdlib: move all imports to alpha.dagger.io
Signed-off-by: Solomon Hykes <solomon@dagger.io>
2021-06-25 10:31:22 +00:00

28 lines
564 B
CUE

package main
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/os"
)
// Test secret mount
SimpleSecret: {
// 'encrypted' and 'cleartext' must be set from identical values
encrypted: dagger.#Secret @dagger(input)
cleartext: string @dagger(input)
ctr: os.#Container & {
secret: "/secret-in": encrypted
command: "cat /secret-in > /secret-out"
}
// Decrypted secret
decrypted: (os.#File & {
from: ctr
path: "/secret-out"
}).contents @dagger(output)
// Assertion: decrypted value must match original cleartext
decrypted: cleartext
}