Skip to content

Commit 8bb5e71

Browse files
authored
Merge pull request #11955 from kiashok/update-to-ws2025
[release/2.1] Backport Enable CIs to run on WS2022 and WS2025
2 parents 8286a48 + 70bcb9b commit 8bb5e71

9 files changed

Lines changed: 41 additions & 31 deletions

File tree

.github/workflows/build-test-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
azure_windows_image_id:
1010
description: Windows image URN to deploy
1111
required: true
12-
default: MicrosoftWindowsServer:WindowsServer:2022-datacenter:latest
12+
default: MicrosoftWindowsServer:WindowsServer:2025-datacenter:latest
1313
azure_vm_size:
1414
description: Windows image builder VM size
1515
required: true

.github/workflows/ci.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
strategy:
2525
matrix:
26-
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-13, windows-2019]
26+
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-13, windows-2025]
2727

2828

2929
steps:
@@ -188,7 +188,7 @@ jobs:
188188

189189
strategy:
190190
matrix:
191-
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-13, windows-2019, windows-2022]
191+
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-13, windows-2022, windows-2025]
192192
go-version: ["1.23.9", "1.24.3"]
193193
steps:
194194
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -214,7 +214,7 @@ jobs:
214214
strategy:
215215
fail-fast: false
216216
matrix:
217-
os: [windows-2022, windows-2019]
217+
os: [windows-2025, windows-2022]
218218
cgroup_driver: [cgroupfs]
219219

220220
defaults:
@@ -244,17 +244,6 @@ jobs:
244244
245245
- run: script/setup/install-dev-tools
246246

247-
# needs to be a separate step since terminal reload is required to bring in new env variables and PATH
248-
- name: Upgrade Chocolaty on Windows 2019
249-
if: matrix.os == 'windows-2019'
250-
shell: powershell
251-
run: .\script\setup\upgrade_chocolaty_windows_2019.ps1
252-
253-
- name: Upgrade MinGW on Windows 2019
254-
if: matrix.os == 'windows-2019'
255-
shell: powershell
256-
run: .\script\setup\upgrade_mingw_windows_2019.ps1
257-
258247
- name: Binaries
259248
shell: bash
260249
env:

.github/workflows/windows-hyperv-periodic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ jobs:
4343
# (e.g. hitting resource limits in the `AZTestVMCreate` task)
4444
fail-fast: false
4545
matrix:
46-
win_ver: [ltsc2019, ltsc2022]
46+
win_ver: [ltsc2022, ltsc2025]
4747
include:
48-
- win_ver: ltsc2019
49-
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest"
50-
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2019-${{ github.run_id }}
51-
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2019-hyperv/"
5248
- win_ver: ltsc2022
5349
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest"
5450
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2022-${{ github.run_id }}
5551
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2022-hyperv/"
52+
- win_ver: ltsc2025
53+
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2025-Datacenter:latest"
54+
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2025-${{ github.run_id }}
55+
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2025-hyperv/"
5656
runs-on: ubuntu-latest
5757
steps:
5858
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/windows-periodic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ jobs:
4242
# (e.g. hitting resource limits in the `AZTestVMCreate` task)
4343
fail-fast: false
4444
matrix:
45-
win_ver: [ltsc2019, ltsc2022]
45+
win_ver: [ltsc2022, ltsc2025]
4646
include:
47-
- win_ver: ltsc2019
48-
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest"
49-
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2019-${{ github.run_id }}
50-
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2019/"
5147
- win_ver: ltsc2022
5248
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest"
5349
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2022-${{ github.run_id }}
5450
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2022/"
51+
- win_ver: ltsc2025
52+
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2025-Datacenter:latest"
53+
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2025-${{ github.run_id }}
54+
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2025/"
5555
runs-on: ubuntu-latest
5656
timeout-minutes: 90
5757
steps:

integration/client/helpers_unix.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ import "os"
2424
func forceRemoveAll(path string) error {
2525
return os.RemoveAll(path)
2626
}
27+
28+
// Used only on Windows to skip tests for certain host OS versions.
29+
func SkipTestOnHost() bool {
30+
return false
31+
}

integration/client/helpers_windows.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"syscall"
2727

2828
"github.com/Microsoft/hcsshim"
29+
"github.com/Microsoft/hcsshim/osversion"
2930
"golang.org/x/sys/windows"
3031
)
3132

@@ -114,3 +115,8 @@ func cleanupWCOWLayer(layerPath string) error {
114115

115116
return nil
116117
}
118+
119+
// Temporarily used on windows to skip failing test on WS2025.
120+
func SkipTestOnHost() bool {
121+
return osversion.Build() == osversion.LTSC2025
122+
}

integration/image_load_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,26 @@ package integration
1919
import (
2020
"os/exec"
2121
"path/filepath"
22+
goruntime "runtime"
2223
"testing"
2324
"time"
2425

26+
"github.com/containerd/containerd/v2/integration/client"
2527
"github.com/containerd/containerd/v2/integration/images"
2628
"github.com/stretchr/testify/require"
2729
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
2830
)
2931

3032
// Test to load an image from tarball.
3133
func TestImageLoad(t *testing.T) {
34+
// TODO(kiashok): Docker is not able to pull the right
35+
// image manifest of `testImage` on WS2025 host. Temporarily
36+
// skipping this test for WS2025 while its fixed on docker.
37+
// This test is validated on WS2022 anyway.
38+
if goruntime.GOOS == "windows" && client.SkipTestOnHost() {
39+
t.Skip("Temporarily skip validating on WS2025")
40+
}
41+
3242
testImage := images.Get(images.BusyBox)
3343
loadedImage := testImage
3444
_, err := exec.LookPath("docker")

integration/images/volume-copy-up/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ endif
3333
OS ?= linux
3434
# Architectures supported: amd64, arm64
3535
ARCH ?= amd64
36-
# OS Version for the Windows images: 1809, 20H2, ltsc2022
37-
OSVERSION ?= 1809
36+
# OS Version for the Windows images: ltsc2022, ltsc2025
37+
OSVERSION ?= ltsc2022
3838

3939
# The output type could either be docker (local), or registry.
4040
# If it is registry, it will also allow us to push the Windows images.
@@ -46,7 +46,7 @@ ALL_OS_ARCH.linux = $(foreach arch, ${ALL_ARCH.linux}, linux-$(arch))
4646

4747
ifneq ($(REMOTE_DOCKER_URL),)
4848
ALL_OS += windows
49-
ALL_OSVERSIONS.windows := 1809 20H2 ltsc2022
49+
ALL_OSVERSIONS.windows := ltsc2022 ltsc2025
5050
ALL_OS_ARCH.windows = $(foreach osversion, ${ALL_OSVERSIONS.windows}, windows-amd64-${osversion})
5151
BASE.windows := mcr.microsoft.com/windows/nanoserver
5252
endif

integration/images/volume-ownership/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ endif
3333
OS ?= linux
3434
# Architectures supported: amd64, arm64
3535
ARCH ?= amd64
36-
# OS Version for the Windows images: 1809, 20H2, ltsc2022
37-
OSVERSION ?= 1809
36+
# OS Version for the Windows images: ltsc2022, lts2025
37+
OSVERSION ?= ltsc2022
3838

3939
# The output type could either be docker (local), or registry.
4040
# If it is registry, it will also allow us to push the Windows images.
@@ -46,7 +46,7 @@ ALL_OS_ARCH.linux = $(foreach arch, ${ALL_ARCH.linux}, linux-$(arch))
4646

4747
ifneq ($(REMOTE_DOCKER_URL),)
4848
ALL_OS += windows
49-
ALL_OSVERSIONS.windows := 1809 20H2 ltsc2022
49+
ALL_OSVERSIONS.windows := ltsc2022 ltsc2025
5050
ALL_OS_ARCH.windows = $(foreach osversion, ${ALL_OSVERSIONS.windows}, windows-amd64-${osversion})
5151
BASE.windows := mcr.microsoft.com/windows/nanoserver
5252
endif

0 commit comments

Comments
 (0)