Skip to content

Add support for Windows server 2022

What does this MR do?

Adds support to the runner for running on Windows LTSC2022

Why was this MR needed?

Windows Server 21H1 became available on GCP:

$ gcloud compute images list --filter windows-server-2022-dc-core
NAME                                   PROJECT        FAMILY             DEPRECATED  STATUS
windows-server-2022-dc-core-v20220314  windows-cloud  windows-2022-core              READY

What's the best way to test this MR?

Run CI job using Windows LTSC2022 runner

  1. Create windows LTCS2022 VM on GCP:

    gcloud compute instances create ratchade-ltsc2022 --image https://www.googleapis.com/compute/v1/projects/windows-cloud/global/images/windows-server-2022-dc-core-v20220314
  2. RDP inside of the machine

  3. Install Docker

  4. Use binary published in https://s3.amazonaws.com/gitlab-runner-downloads/windows-server-2022/index.html.

    Invoke-WebRequest -UseBasicParsing -OutFile gitlab-runner.exe https://s3.amazonaws.com/gitlab-runner-downloads/windows-server-2022/binaries/gitlab-runner-windows-amd64.exe
  5. Register runner

    .\gitlab-runner register --executor "docker-windows" --url "https://gitlab.com/" --description "docker-21H1-runner" --tag-list "docker,21H1,gitlab.com" --locked="false" --access-level="not_protected" --registration-token="$TOKEN" --non-interactive --docker-image mcr.microsoft.com/windows/servercore:ltsc2022-amd64 --docker-helper-image aaro301/gitlab-runner-helper:x86_64-f4949051-servercore21H1
  6. Start runner

    .\gitlab-runner run

What are the relevant issue numbers?

close #27859 (closed)

Merge request reports

Loading