build: support local state group

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-09-25 23:28:22 +02:00
parent 9b7d30c9a0
commit 3dcb03452c
8 changed files with 222 additions and 136 deletions

View File

@ -28,17 +28,16 @@ func saveLocalState(so *client.SolveOpt, target string, opts Options, node build
return err
}
}
ls, err := localstate.New(configDir)
l, err := localstate.New(configDir)
if err != nil {
return err
}
if err := ls.SaveRef(node.Builder, node.Name, so.Ref, localstate.State{
return l.SaveRef(node.Builder, node.Name, so.Ref, localstate.State{
Target: target,
LocalPath: lp,
DockerfilePath: dp,
}); err != nil {
return err
}
GroupRef: opts.GroupRef,
})
}
return nil
}