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/examples/olivier/example.cue
dubo-dubon-duponey 8d104c9e10
Fix examples
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
2021-01-11 16:40:13 -08:00

64 lines
1.2 KiB
CUE

package example
import (
"dagger.cloud/alpine"
"dagger.cloud/dagger"
)
test: {
string
#dagger: compute: [
dagger.#Load & { from: alpine },
dagger.#Copy & {
from: [
dagger.#FetchContainer & { ref: alpine.ref },
]
dest: "/src"
// https://github.com/blocklayerhq/dagger/issues/9
src: "/"
},
dagger.#Exec & {
dir: "/src"
args: ["sh", "-c", """
ls -l > /tmp/out
"""
]
// https://github.com/blocklayerhq/dagger/issues/6
mount: foo: {}
// mount: dagger.#Mount
},
dagger.#Export & {
// https://github.com/blocklayerhq/dagger/issues/8
// source: "/tmp/out"
},
]
}
www: {
// Domain where the site will be deployed (user input)
domain: string
url: {
string & =~ "https://.*"
// https://github.com/blocklayerhq/dagger/issues/10
#dagger2: compute: [
dagger.#Load & { from: alpine },
dagger.#Exec & {
args: ["sh", "-c",
"""
echo 'deploying to netlify (not really)'
echo 'https://\(domain)/foo' > /tmp/out
"""
]
// https://github.com/blocklayerhq/dagger/issues/6
mount: foo: {}
},
dagger.#Export & {
// https://github.com/blocklayerhq/dagger/issues/8
// source: "/tmp/out"
}
]
}
}