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.
Files
dagger/pkg/alpha.dagger.io/dagger/op/op.cue
Andrea Luzzardi 282759c0e5 cue modules: move stdlib to pkg/alpha.dagger.io
In preparation for Europa, we will vendor multiple CUE modules:

- `pkg/alpha.dagger.io`: legacy non-europa packages
- `pkg/dagger.io`: core Europa packages
- `pkg/universe.dagger.io`: Europa universe

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2022-01-11 13:16:37 -08:00

148 lines
2.8 KiB
CUE

// op: low-level operations for Dagger processing pipelines
package op
// One operation in a pipeline
//
// FIXME: #Op does not current enforce the op spec at full resolution, to avoid
// FIXME: triggering performance issues. See https://github.com/dagger/dagger/issues/445
// FIXME: To enforce the full #Op spec (see op_fullop.cue), run with "-t fullop"
#Op: {
do: string
...
}
// 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]
exclude: [...string]
}
// FIXME: bring back load (more efficient than copy)
#Load: {
do: "load"
from: _
}
#Subdir: {
do: "subdir"
dir: string
}
#Workdir: {
do: "workdir"
path: string
}
#Exec: {
do: "exec"
args: [...string]
env?: [string]: string
// `true` means also ignoring the mount cache volumes
always?: true | *false
dir: string | *"/"
// HACK: FIXME later [Performance related]
// mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} | {secret: _}
// https://github.com/dagger/dagger/issues/856
mount: [string]: {
_
...
}
// Map of hostnames to ip
hosts?: [string]: string
// User to exec with (if left empty, will default to the set user in the image)
user?: string
}
#DockerLogin: {
do: "docker-login"
target: string
username: string
// FIXME: should be a #Secret (circular import)
secret: _ @dagger(secret)
}
#FetchContainer: {
do: "fetch-container"
ref: string
}
#PushContainer: {
do: "push-container"
ref: string
}
#SaveImage: {
do: "save-image"
tag: string
dest: string
}
#FetchGit: {
do: "fetch-git"
remote: string
ref: string
keepGitDir?: bool
// FIXME: the two options are currently ignored until we support buildkit secrets
authToken?: _ @dagger(secret)
authHeader?: _ @dagger(secret)
}
#FetchHTTP: {
do: "fetch-http"
url: string
checksum?: string
filename?: string
mode?: int | *0o644
uid?: int
gid?: int
}
#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?: {
// FIXME: should be `[string]: string | #Secret` (circular import)
[string]: string | _ @dagger(secret)
}
label?: [string]: string
target?: string
hosts?: [string]: string
}
#WriteFile: {
do: "write-file"
// FIXME: "contents" to follow english convention
content: string | bytes
dest: string
mode: int | *0o644
}
#Mkdir: {
do: "mkdir"
dir: *"/" | string
path: string
mode: int | *0o755
}