embedded stdlib
This PR embeds the stdlib into the dagger binary itself for convenience. Long term we will want to source the stdlib directly from git. - Updated go to 1.16 to use the new built-in embedding functionality - The `stdlib` go package now contains an embed of the stdlib Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
61
stdlib/dagger/dagger.cue
Normal file
61
stdlib/dagger/dagger.cue
Normal file
@@ -0,0 +1,61 @@
|
||||
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 | *"/"
|
||||
}
|
Reference in New Issue
Block a user