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
Solomon Hykes 30f75da114 Move prototype 69-dagger-archon to top-level
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2020-12-29 18:45:16 -08:00

64 lines
871 B
CUE

package example
import (
"dagger.cloud/alpine"
)
test: {
string
#dagger: compute: [
{ do: "load", from: alpine },
{
do: "copy"
from: [
{ do: "fetch-container", ref: alpine.ref },
]
dest: "/src"
},
{
do: "exec"
dir: "/src"
args: ["sh", "-c", """
ls -l > /tmp/out
"""
]
},
{
do: "export"
source: "/tmp/out"
format: "string"
}
]
}
www: {
// Domain where the site will be deployed (user input)
domain: string
// URL after deployment (computed)
url: {
string & =~ "https://.*"
#dagger: {
compute: [
{ do: "load", from: alpine },
{
do: "exec"
args: ["sh", "-c",
"""
echo 'deploying to netlify (not really)'
echo 'https://\(domain)/foo' > /tmp/out
"""
]
},
{
do: "export"
source: "/tmp/out"
format: "string"
}
]
}
}
}