diff --git a/dagger/deployment.go b/dagger/deployment.go index 3726e49f..c4b6a64a 100644 --- a/dagger/deployment.go +++ b/dagger/deployment.go @@ -199,7 +199,7 @@ func (d *Deployment) LocalDirs() map[string]string { flow := cueflow.New(&cueflow.Config{}, inst, newTaskFunc(inst, noOpRunner)) for _, t := range flow.Tasks() { v := compiler.Wrap(t.Value(), inst) - localdirs(v.Lookup("#compute")) + localdirs(v.Lookup("#up")) } // 2. Scan the plan diff --git a/dagger/input.go b/dagger/input.go index 7e1bab31..a00db28f 100644 --- a/dagger/input.go +++ b/dagger/input.go @@ -93,7 +93,7 @@ func (dir dirInput) Compile() (*compiler.Value, error) { } } llb := fmt.Sprintf( - `#compute: [{do:"local",dir:"%s", include:%s}]`, + `#up: [{do:"local",dir:"%s", include:%s}]`, dir.Path, includeLLB, ) @@ -125,7 +125,7 @@ func (git gitInput) Compile() (*compiler.Value, error) { } return compiler.Compile("", fmt.Sprintf( - `#compute: [{do:"fetch-git", remote:"%s", ref:"%s"}]`, + `#up: [{do:"fetch-git", remote:"%s", ref:"%s"}]`, git.Remote, ref, )) diff --git a/dagger/pipeline.go b/dagger/pipeline.go index 5819ccec..c3e35e9d 100644 --- a/dagger/pipeline.go +++ b/dagger/pipeline.go @@ -61,7 +61,7 @@ func (p *Pipeline) FS() fs.FS { } func isComponent(v *compiler.Value) bool { - return v.Lookup("#compute").Exists() + return v.Lookup("#up").Exists() } func ops(code ...*compiler.Value) ([]*compiler.Value, error) { @@ -70,7 +70,7 @@ func ops(code ...*compiler.Value) ([]*compiler.Value, error) { for _, x := range code { // 1. attachment array if isComponent(x) { - xops, err := x.Lookup("#compute").List() + xops, err := x.Lookup("#up").List() if err != nil { return nil, err } diff --git a/stdlib/dagger/dagger.cue b/stdlib/dagger/dagger.cue index 3758fbff..6135047f 100644 --- a/stdlib/dagger/dagger.cue +++ b/stdlib/dagger/dagger.cue @@ -7,7 +7,7 @@ import ( // An artifact such as source code checkout, container image, binary archive... // May be passed as user input, or computed by a buildkit pipeline #Artifact: { - #compute: [...llb.#Op] + #up: llb.#Pipeline _ ... } diff --git a/stdlib/llb/llb.cue b/stdlib/llb/llb.cue index fa20b071..c7830da3 100644 --- a/stdlib/llb/llb.cue +++ b/stdlib/llb/llb.cue @@ -1,7 +1,7 @@ // llb: compile LLB graphs executable by buildkit package llb -// One operation in a script +// One operation in a pipeline #Op: #Export | #FetchContainer | #PushContainer | @@ -15,6 +15,9 @@ package llb #Mkdir | #DockerBuild +// Pipeline is a series of operations +#Pipeline: [...llb.#Op] + // Export a value from fs state to cue #Export: { do: "export"