doc/ci/runners/hosted_runners/windows.md
{{< details >}}
{{< /details >}}
Hosted runners on Windows autoscale by launching virtual machines on the Google Cloud Platform. This solution uses an autoscaling driver developed by GitLab for the custom executor. Hosted runners on Windows are in beta.
GitLab keeps iterating to get Windows runners in a stable state and generally available. You can follow the work towards this goal in the related epic.
GitLab offers the following machine type for hosted runners on Windows.
| Runner Tag | vCPUs | Memory | Storage |
|---|---|---|---|
saas-windows-medium-amd64 | 2 | 7.5 GB | 75 GB |
The Windows runner virtual machine instances do not use the GitLab Docker executor. This means that you can't specify
image or services in your pipeline configuration.
You can execute your job in one of the following Windows versions:
| Version | Status |
|---|---|
| Windows 2022 | GA |
You can find a full list of available pre-installed software in the pre-installed software documentation.
Hosted runners on Windows have PowerShell configured as the shell.
The script section of your .gitlab-ci.yml file therefore requires PowerShell commands.
.gitlab-ci.yml fileUse this example .gitlab-ci.yml file to get started with hosted runners on Windows:
.windows_job:
tags:
- saas-windows-medium-amd64
before_script:
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
- echo ${time}
- echo "started by ${GITLAB_USER_NAME} / @${GITLAB_USER_LOGIN}"
build:
extends:
- .windows_job
stage: build
script:
- echo "running scripts in the build job"
test:
extends:
- .windows_job
stage: test
script:
- echo "running scripts in the test job"