Merge pull request #342 from verdverm/scan-for-inputs

add cmd/input/list to scan a plan for inputs
This commit is contained in:
Andrea Luzzardi
2021-04-22 18:41:23 -07:00
committed by GitHub
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"
bkauth "github.com/moby/buildkit/session/auth"
@@ -360,3 +361,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
}