diff --git a/.cirrus.yml b/.cirrus.yml index be9b574c2f2..5562500266e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -12,3 +12,10 @@ task: - go test -v ./pkg/... - cd cmd/nerdctl - sudo go run . run $NERDCTL_RUN_ARGS | grep running + +docker_builder: + platform: windows + os_version: 2019 + env: + CGO_ENABLED: 0 + build_script: go test -v -run ^\QTestRunEnvFile\E$ ./cmd/... diff --git a/pkg/testutil/testutil.go b/pkg/testutil/testutil.go index 05c985805ad..22aad2466ce 100644 --- a/pkg/testutil/testutil.go +++ b/pkg/testutil/testutil.go @@ -23,6 +23,7 @@ import ( "io" "os" "os/exec" + "runtime" "strings" "testing" "time" @@ -399,6 +400,12 @@ func NewBase(t *testing.T) *Base { } func mirrorOf(s string) string { + if runtime.GOOS == "windows" { + // use gcr.io/k8s-staging-e2e-test-images/busybox:1.29-2-windows-amd64-ltsc2022 locally on windows 11 + // https://github.com/microsoft/Windows-Containers/issues/179 + return "gcr.io/k8s-staging-e2e-test-images/busybox:1.29-2" + } + // plain mirror, NOT stargz-converted images return fmt.Sprintf("ghcr.io/stargz-containers/%s-org", s) }