pipeline: #compute -> #up
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
6486e159c1
commit
8a4aa4d42b
@ -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
|
||||
|
@ -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,
|
||||
))
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
_
|
||||
...
|
||||
}
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user