From 8be9feced08ffa721d3fe97bfe9022b09ef5b277 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 22 Nov 2023 10:23:46 +0100 Subject: [PATCH 1/2] Self hosted runners: make VM image configurable through environment variable The image SKU was hidden a bit in the azure-arm-template.json. Let's make it more visible by turning it into a parameter that the CI pipeline can provide. Signed-off-by: Dennis Ameling --- .github/workflows/create-azure-self-hosted-runners.yml | 2 ++ azure-self-hosted-runners/azure-arm-template.json | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-azure-self-hosted-runners.yml b/.github/workflows/create-azure-self-hosted-runners.yml index e72c8fd9..5e1b435f 100644 --- a/.github/workflows/create-azure-self-hosted-runners.yml +++ b/.github/workflows/create-azure-self-hosted-runners.yml @@ -39,6 +39,7 @@ env: # For more information, see https://learn.microsoft.com/en-us/azure/virtual-machines/dplsv5-dpldsv5-series (which # unfortunately does not have more information about price by region) AZURE_VM_REGION: westus2 + AZURE_VM_IMAGE: win11-22h2-ent # The following secrets are required for this workflow to run: # AZURE_CREDENTIALS - Credentials for the Azure CLI. It's recommended to set up a resource @@ -130,6 +131,7 @@ jobs: githubActionsRunnerRegistrationUrl="$ACTIONS_RUNNER_REGISTRATION_URL" githubActionsRunnerToken="$ACTIONS_RUNNER_TOKEN" postDeploymentPsScriptUrl="$POST_DEPLOYMENT_SCRIPT_URL" + virtualMachineImage="$AZURE_VM_IMAGE" virtualMachineName="${{ steps.generate-vm-name.outputs.vm_name }}" virtualMachineSize="$AZURE_VM_TYPE" publicIpAddressName1="${{ steps.generate-vm-name.outputs.vm_name }}-ip" diff --git a/azure-self-hosted-runners/azure-arm-template.json b/azure-self-hosted-runners/azure-arm-template.json index 42a81bad..1bf6b140 100644 --- a/azure-self-hosted-runners/azure-arm-template.json +++ b/azure-self-hosted-runners/azure-arm-template.json @@ -81,6 +81,9 @@ "osDiskDeleteOption": { "type": "string" }, + "virtualMachineImage": { + "type": "string" + }, "virtualMachineSize": { "type": "string" }, @@ -209,7 +212,7 @@ "imageReference": { "publisher": "microsoftwindowsdesktop", "offer": "windows11preview-arm64", - "sku": "win11-22h2-ent", + "sku": "[parameters('virtualMachineImage')]", "version": "latest" } }, From db516f6f97746d05bf2d74ca1a30a8177eae2fa7 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 22 Nov 2023 10:28:32 +0100 Subject: [PATCH 2/2] Self hosted runners: update image from 22h2 to 23h2 Version 23h2 was released on October 31st, 2023. Let's update to it, so that the runners benefit from the latest improvements to Windows 11 ARM64. Signed-off-by: Dennis Ameling --- .github/workflows/create-azure-self-hosted-runners.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-azure-self-hosted-runners.yml b/.github/workflows/create-azure-self-hosted-runners.yml index 5e1b435f..f48988e9 100644 --- a/.github/workflows/create-azure-self-hosted-runners.yml +++ b/.github/workflows/create-azure-self-hosted-runners.yml @@ -39,7 +39,7 @@ env: # For more information, see https://learn.microsoft.com/en-us/azure/virtual-machines/dplsv5-dpldsv5-series (which # unfortunately does not have more information about price by region) AZURE_VM_REGION: westus2 - AZURE_VM_IMAGE: win11-22h2-ent + AZURE_VM_IMAGE: win11-23h2-ent # The following secrets are required for this workflow to run: # AZURE_CREDENTIALS - Credentials for the Azure CLI. It's recommended to set up a resource