add cmd/input/list to scan a plan for inputs

Signed-off-by: Tony Worm <tony@hofstadter.io>
This commit is contained in:
Tony Worm
2021-04-19 16:44:21 -04:00
parent d93c8929cb
commit 6488d41603
6 changed files with 324 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import (
"cuelang.org/go/cue"
cueflow "cuelang.org/go/tools/flow"
"dagger.io/go/dagger/compiler"
"dagger.io/go/pkg/cuetils"
"dagger.io/go/stdlib"
"github.com/opentracing/opentracing-go"
@@ -290,3 +291,12 @@ func newPipelineRunner(inst *cue.Instance, computed *compiler.Value, s Solver) c
return nil
})
}
func (d *Deployment) ScanInputs() ([]cue.Value, error) {
vals, err := cuetils.ScanForInputs(d.plan.Cue())
if err != nil {
return nil, err
}
return vals, nil
}