tests: set a dedicated buildx config dir for each worker

This should help reduce any unexpected config conflict between workers.

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-06-20 12:40:41 +01:00
parent efd7279118
commit 6f394a0691
4 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package workers
import (
"context"
"os"
"os/exec"
"github.com/moby/buildkit/identity"
@ -41,6 +42,7 @@ func (c dockerWorker) New(ctx context.Context, cfg *integration.BackendConfig) (
name,
"--docker", "host="+bk.DockerAddress(),
)
cmd.Env = append(os.Environ(), "BUILDX_CONFIG=/tmp/buildx-"+name)
if err := cmd.Run(); err != nil {
return bk, cl, errors.Wrapf(err, "failed to create buildx instance %s", name)
}