Move prototype 69-dagger-archon to top-level
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
63
examples/olivier/example.cue
Normal file
63
examples/olivier/example.cue
Normal file
@@ -0,0 +1,63 @@
|
||||
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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user