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.
dagger/plan/task/scratch.go
Joel Longtine a90ff8ab94 Allow for nil buildkit References
Signed-off-by: Joel Longtine <joel@dagger.io>
2021-12-21 12:10:48 -07:00

25 lines
501 B
Go

package task
import (
"context"
"go.dagger.io/dagger/compiler"
"go.dagger.io/dagger/plancontext"
"go.dagger.io/dagger/solver"
)
func init() {
Register("Scratch", func() Task { return &scratchTask{} })
}
type scratchTask struct {
}
func (t *scratchTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
fs := pctx.FS.New(nil)
return compiler.NewValue().FillFields(map[string]interface{}{
"output": fs.MarshalCUE(),
})
}