package yarn
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/alpine"
"alpha.dagger.io/os"
)
TestData: dagger.#Artifact
TestReact: {
pkg: #Package & {
source: TestData
}
test: os.#Container & {
image: alpine.#Image & {
package: bash: true
mount: "/build": from: pkg.build
command: """
test "$(cat /build/test)" = "output"
"""
TestData2: dagger.#Artifact
TestSecretsAndFile: {
source: TestData2
writeEnvFile: "/.env"
env: {
one: "one"
two: "two"
secrets: {
secretone: dagger.#Secret @dagger(input)
secretwo: dagger.#Secret @dagger(input)
shell: path: "/bin/bash"
content="$(cat /build/env)"
[[ "${content}" = *"SECRETONE="* ]] && \\
[[ "${content}" = *"SECRETWO="* ]] && \\
[[ "${content}" = *"ONE=one"* ]] && \\
[[ "${content}" = *"TWO=two"* ]]