From 612f36ae80932bfe924967e9f44c968911dbb81d Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Mon, 17 Jun 2024 12:03:58 -0700 Subject: [PATCH] Update macos image from 11 to latest (#8457) * Update macos image from 11 to latest * unpin pester now that 5.6.0 is on the agent --- doc/common/matrix_generator.md | 10 +++++----- .../matrix-generator/samples/matrix.json | 2 +- .../job-matrix-functions.filter.tests.ps1 | 2 +- .../tests/job-matrix-functions.tests.ps1 | 18 +++++++++--------- .../stages/archetype-sdk-tool-pwsh.yml | 2 +- .../templates/steps/run-pester-tests.yml | 4 +--- eng/pipelines/agent-software-inventory.yml | 2 +- eng/pipelines/templates/variables/image.yml | 2 +- 8 files changed, 20 insertions(+), 22 deletions(-) diff --git a/doc/common/matrix_generator.md b/doc/common/matrix_generator.md index 1f8a87680cf..9f8553c2db5 100644 --- a/doc/common/matrix_generator.md +++ b/doc/common/matrix_generator.md @@ -175,7 +175,7 @@ Example: "operatingSystem": [ "windows-2022", "ubuntu-22.04", - "macos-11" + "macos-latest" ], "framework": [ "net461", @@ -526,7 +526,7 @@ For example: ``` yaml { - "net461_macOS1015": { + "net461_macOSlatest": { "framework": "net461", "operatingSystem": "env:OperatingSystem" } @@ -542,9 +542,9 @@ In the matrix job output that azure pipelines consumes, the format is a map of m ``` yaml { - "net461_macOS1015": { + "net461_macOSlatest": { "framework": "net461", - "operatingSystem": "macos-11" + "operatingSystem": "macos-latest" }, "net60_ubuntu2204": { "framework": "net6.0", @@ -697,7 +697,7 @@ Given a matrix like below with `JavaTestVersion` marked as a non-sparse paramete "Agent": { "windows-2022": { "OSVmImage": "windows-2022", "Pool": "azsdk-pool-mms-win-2022-general" }, "ubuntu-2204": { "OSVmImage": "ubuntu-22.04", "Pool": "azsdk-pool-mms-ubuntu-2204-general" }, - "macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" } + "macos-latest": { "OSVmImage": "macos-latest", "Pool": "Azure Pipelines" } }, "JavaTestVersion": [ "1.8", "1.11" ], "AZURE_TEST_HTTP_CLIENTS": "netty", diff --git a/eng/common-tests/matrix-generator/samples/matrix.json b/eng/common-tests/matrix-generator/samples/matrix.json index 35dc218cd95..ec24f679840 100644 --- a/eng/common-tests/matrix-generator/samples/matrix.json +++ b/eng/common-tests/matrix-generator/samples/matrix.json @@ -6,7 +6,7 @@ "Agent": { "ubuntu": { "OSVmImage": "ubuntu-20.04", "Pool": "Azure Pipelines" }, "windows": { "OSVmImage": "windows-2022", "Pool": "Azure Pipelines" }, - "macOS": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" } + "macOS": { "OSVmImage": "macos-latest", "Pool": "Azure Pipelines" } }, "TestTargetFramework": [ "netcoreapp2.1", "net461", "net5.0" ] }, diff --git a/eng/common-tests/matrix-generator/tests/job-matrix-functions.filter.tests.ps1 b/eng/common-tests/matrix-generator/tests/job-matrix-functions.filter.tests.ps1 index a727c8f424e..e00bf8f0cb1 100644 --- a/eng/common-tests/matrix-generator/tests/job-matrix-functions.filter.tests.ps1 +++ b/eng/common-tests/matrix-generator/tests/job-matrix-functions.filter.tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { $matrixConfig = @" { "matrix": { - "operatingSystem": [ "windows-2022", "ubuntu-20.04", "macos-11" ], + "operatingSystem": [ "windows-2022", "ubuntu-20.04", "macos-latest" ], "framework": [ "net461", "netcoreapp2.1" ], "additionalArguments": [ "", "mode=test" ] } diff --git a/eng/common-tests/matrix-generator/tests/job-matrix-functions.tests.ps1 b/eng/common-tests/matrix-generator/tests/job-matrix-functions.tests.ps1 index 5a01b3e990a..94034901524 100644 --- a/eng/common-tests/matrix-generator/tests/job-matrix-functions.tests.ps1 +++ b/eng/common-tests/matrix-generator/tests/job-matrix-functions.tests.ps1 @@ -12,7 +12,7 @@ BeforeAll { "operatingSystem": [ "windows-2022", "ubuntu-20.04", - "macos-11" + "macos-latest" ], "framework": [ "net461", @@ -36,11 +36,11 @@ BeforeAll { "framework": "net461" }, { - "operatingSystem": "macos-11", + "operatingSystem": "macos-latest", "framework": "netcoreapp2.1" }, { - "operatingSystem": ["macos-11", "ubuntu-20.04"], + "operatingSystem": ["macos-latest", "ubuntu-20.04"], "additionalArguments": "--enableFoo" } ] @@ -275,7 +275,7 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" { "operatingSystem": [ "windows-2022", "ubuntu-20.04", - "macos-11" + "macos-latest" ], "framework": [ "net461", @@ -321,7 +321,7 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" { $element.name | Should -Be "ubuntu2004_netcoreapp21_withFoo" $element = GetNdMatrixElement @(2, 1, 1) $matrix $dimensions - $element.name | Should -Be "macOS11_netcoreapp21_withFoo" + $element.name | Should -Be "macOSlatest_netcoreapp21_withFoo" } It "Should initialize an N-dimensional matrix from all parameter permutations" { @@ -340,7 +340,7 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" { $element.parameters.additionalArguments | Should -Be "--enableFoo" $element = GetNdMatrixElement @(2, 1, 1) $matrix $dimensions - $element.parameters.operatingSystem | Should -Be "macos-11" + $element.parameters.operatingSystem | Should -Be "macos-latest" $element.parameters.framework | Should -Be "netcoreapp2.1" $element.parameters.additionalArguments | Should -Be "--enableFoo" } @@ -348,7 +348,7 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" { It "Should initialize a sparse matrix from an N-dimensional matrix" -TestCases @( @{ i = 0; name = "windows2022_net461"; operatingSystem = "windows-2022"; framework = "net461"; additionalArguments = ""; } @{ i = 1; name = "ubuntu2004_netcoreapp21_withfoo"; operatingSystem = "ubuntu-20.04"; framework = "netcoreapp2.1"; additionalArguments = "--enableFoo"; } - @{ i = 2; name = "macOS11_net461"; operatingSystem = "macos-11"; framework = "net461"; additionalArguments = ""; } + @{ i = 2; name = "macOSlatest_net461"; operatingSystem = "macos-latest"; framework = "net461"; additionalArguments = ""; } ) { $sparseMatrix = GenerateSparseMatrix $generateConfig.matrixParameters $generateConfig.displayNamesLookup $dimensions = GetMatrixDimensions $generateConfig.matrixParameters @@ -440,9 +440,9 @@ Describe "Platform Matrix Post Transformation" -Tag "UnitTest", "transform" { $matrix[2].parameters.operatingSystem | Should -Be "ubuntu-20.04" $matrix[2].parameters.additionalArguments | Should -Be "" - $matrix[4].name | Should -Be "macOS11_net461" + $matrix[4].name | Should -Be "macOSlatest_net461" $matrix[4].parameters.framework | Should -Be "net461" - $matrix[4].parameters.operatingSystem | Should -Be "macos-11" + $matrix[4].parameters.operatingSystem | Should -Be "macos-latest" $matrix[4].parameters.additionalArguments | Should -Be "" $matrix[7].name | Should -Be "windows2022_net50_enableWindowsFoo" diff --git a/eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml b/eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml index a2d51dd1d21..e068fbd1d7b 100644 --- a/eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml +++ b/eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml @@ -29,7 +29,7 @@ stages: Image: ubuntu-22.04 Mac: Pool: Azure Pipelines - Image: macos-11 + Image: macos-latest pool: name: $(Pool) diff --git a/eng/common/pipelines/templates/steps/run-pester-tests.yml b/eng/common/pipelines/templates/steps/run-pester-tests.yml index 036bcbcae3e..6c1039ce343 100644 --- a/eng/common/pipelines/templates/steps/run-pester-tests.yml +++ b/eng/common/pipelines/templates/steps/run-pester-tests.yml @@ -13,10 +13,8 @@ parameters: steps: - # Lock Pester to 5.5.0. The reason being is that the signing of 5.6.0 is different and Windows complains. - # The tracking issue: https://github.com/Azure/azure-sdk-tools/issues/8395 - pwsh: | - Install-Module -Name Pester -RequiredVersion 5.5.0 -Force + Install-Module -Name Pester -Force displayName: Install Pester # default test steps diff --git a/eng/pipelines/agent-software-inventory.yml b/eng/pipelines/agent-software-inventory.yml index addd5dd02d4..101c1cb31f8 100644 --- a/eng/pipelines/agent-software-inventory.yml +++ b/eng/pipelines/agent-software-inventory.yml @@ -36,7 +36,7 @@ jobs: Host: Windows CustomMacOS: Pool: Azure Pipelines - OSVmImage: macos-11 + OSVmImage: macos-latest Host: MacOS pool: diff --git a/eng/pipelines/templates/variables/image.yml b/eng/pipelines/templates/variables/image.yml index fd536b8c08c..644c8e916d8 100644 --- a/eng/pipelines/templates/variables/image.yml +++ b/eng/pipelines/templates/variables/image.yml @@ -17,7 +17,7 @@ variables: - name: WINDOWSVMIMAGE value: azsdk-pool-mms-win-2022-1espt - name: MACVMIMAGE - value: macos-11 + value: macos-latest # Values required for pool.os field in 1es pipeline templates - name: LINUXOS