mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
Merge pull request #1735 from tonistiigi/localstate
build: support for saving local state by build ref
This commit is contained in:
@ -14,6 +14,7 @@ import (
|
||||
"github.com/docker/buildx/driver"
|
||||
k8sutil "github.com/docker/buildx/driver/kubernetes/util"
|
||||
remoteutil "github.com/docker/buildx/driver/remote/util"
|
||||
"github.com/docker/buildx/localstate"
|
||||
"github.com/docker/buildx/store"
|
||||
"github.com/docker/buildx/store/storeutil"
|
||||
"github.com/docker/buildx/util/cobrautil"
|
||||
@ -170,6 +171,13 @@ func runCreate(dockerCli command.Cli, in createOptions, args []string) error {
|
||||
if err := ng.Leave(in.nodeName); err != nil {
|
||||
return err
|
||||
}
|
||||
ls, err := localstate.New(confutil.ConfigDir(dockerCli))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := ls.RemoveBuilderNode(ng.Name, in.nodeName); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
switch {
|
||||
case driverName == "kubernetes":
|
||||
|
Reference in New Issue
Block a user