docs: deploy using dagger
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -213,6 +213,8 @@ func (p *Pipeline) doOp(ctx context.Context, op *compiler.Value, st llb.State) (
|
||||
return p.Local(ctx, op, st)
|
||||
case "load":
|
||||
return p.Load(ctx, op, st)
|
||||
case "workdir":
|
||||
return p.Workdir(ctx, op, st)
|
||||
case "subdir":
|
||||
return p.Subdir(ctx, op, st)
|
||||
case "docker-build":
|
||||
@@ -232,6 +234,14 @@ func (p *Pipeline) vertexNamef(format string, a ...interface{}) string {
|
||||
return prefix + " " + name
|
||||
}
|
||||
|
||||
func (p *Pipeline) Workdir(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
|
||||
path, err := op.Lookup("path").String()
|
||||
if err != nil {
|
||||
return st, err
|
||||
}
|
||||
return st.Dir(path), nil
|
||||
}
|
||||
|
||||
func (p *Pipeline) Subdir(ctx context.Context, op *compiler.Value, st llb.State) (llb.State, error) {
|
||||
// FIXME: this could be more optimized by carrying subdir path as metadata,
|
||||
// and using it in copy, load or mount.
|
||||
|
Reference in New Issue
Block a user