Merge pull request #2696 from crazy-max/test-fix-cleanup

test: fix missing envs when cleaning up some workers
This commit is contained in:
Tõnis Tiigi 2024-09-17 20:27:29 -07:00 committed by GitHub
commit 9eb0318ee6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -73,6 +73,11 @@ func (w *containerWorker) New(ctx context.Context, cfg *integration.BackendConfi
cl := func() error {
cmd := exec.Command("buildx", "rm", "-f", name)
cmd.Env = append(
os.Environ(),
"BUILDX_CONFIG=/tmp/buildx-"+name,
"DOCKER_CONTEXT="+w.docker.DockerAddress(),
)
return cmd.Run()
}

View File

@ -56,6 +56,7 @@ func (w remoteWorker) New(ctx context.Context, cfg *integration.BackendConfig) (
cl = func() error {
err := bkclose()
cmd := exec.Command("buildx", "rm", "-f", name)
cmd.Env = append(os.Environ(), "BUILDX_CONFIG=/tmp/buildx-"+name)
if err1 := cmd.Run(); err == nil {
err = err1
}