bc2dae7e32
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
74 lines
1.3 KiB
CUE
74 lines
1.3 KiB
CUE
package dagger
|
|
|
|
// Any component can be referenced as a directory, since
|
|
// every dagger script outputs a filesystem state (aka a directory)
|
|
#Dir: #dagger: compute: [...#Op]
|
|
|
|
// One operation in a script
|
|
#Op: #FetchContainer | #FetchGit | #Export | #Exec | #Local | #Copy | #Load | #Subdir
|
|
|
|
// Export a value from fs state to cue
|
|
#Export: {
|
|
do: "export"
|
|
// Source path in the container
|
|
source: string
|
|
format: "json" | "yaml" | *"string"
|
|
}
|
|
|
|
#Local: {
|
|
do: "local"
|
|
dir: string
|
|
include: [...string] | *[]
|
|
}
|
|
|
|
// FIXME: bring back load (more efficient than copy)
|
|
|
|
#Load: {
|
|
do: "load"
|
|
from: _
|
|
}
|
|
|
|
#Subdir: {
|
|
do: "subdir"
|
|
dir: string | *"/"
|
|
}
|
|
|
|
#Exec: {
|
|
do: "exec"
|
|
args: [...string]
|
|
env?: [string]: string
|
|
always?: true | *false
|
|
dir: string | *"/"
|
|
mount: [string]: "tmp" | "cache" | {from: _, path: string | *"/"}
|
|
}
|
|
|
|
#FetchContainer: {
|
|
do: "fetch-container"
|
|
ref: string
|
|
}
|
|
|
|
#FetchGit: {
|
|
do: "fetch-git"
|
|
remote: string
|
|
ref: string
|
|
}
|
|
|
|
#Copy: {
|
|
do: "copy"
|
|
from: _
|
|
src: string | *"/"
|
|
dest: string | *"/"
|
|
}
|
|
|
|
#DockerBuild: {
|
|
do: "docker-build"
|
|
// We accept either a context, a Dockerfile or both together
|
|
context?: _
|
|
dockerfilePath?: string // path to the Dockerfile (defaults to "Dockerfile")
|
|
dockerfile?: string
|
|
|
|
platforms?: [...string]
|
|
buildArg?: [string]: string
|
|
label?: [string]: string
|
|
}
|