diff --git a/eng/common/pipelines/templates/jobs/docindex.yml b/eng/common/pipelines/templates/jobs/docindex.yml index ea7b2997dbd38..b695c878281c3 100644 --- a/eng/common/pipelines/templates/jobs/docindex.yml +++ b/eng/common/pipelines/templates/jobs/docindex.yml @@ -1,7 +1,7 @@ jobs: - job: CreateDocIndex pool: - vmImage: windows-2019 + vmImage: windows-2022 steps: - task: UsePythonVersion@0 displayName: 'Use Python 3.9' diff --git a/eng/common/scripts/job-matrix/README.md b/eng/common/scripts/job-matrix/README.md index d112c53574ab5..f4a7205082206 100644 --- a/eng/common/scripts/job-matrix/README.md +++ b/eng/common/scripts/job-matrix/README.md @@ -100,7 +100,7 @@ Example: ``` "matrix": { "operatingSystem": [ - "windows-2019", + "windows-2022", "ubuntu-18.04", "macos-11" ], @@ -386,14 +386,14 @@ In the matrix job output that azure pipelines consumes, the format is a dictiona "framework": "net50", "operatingSystem": "ubuntu-18.04" }, - "netcoreapp21_windows2019": { + "netcoreapp21_windows2022": { "framework": "netcoreapp2.1", - "operatingSystem": "windows-2019" + "operatingSystem": "windows-2022" }, - "UseProjectRef_net461_windows2019": { + "UseProjectRef_net461_windows2022": { "additionalTestArguments": "/p:UseProjectReferenceToAzureClients=true", "framework": "net461", - "operatingSystem": "windows-2019" + "operatingSystem": "windows-2022" } } ``` @@ -510,7 +510,7 @@ Given a matrix like below with `JavaTestVersion` marked as a non-sparse paramete { "matrix": { "Agent": { - "windows-2019": { "OSVmImage": "MMS2019", "Pool": "azsdk-pool-mms-win-2019-general" }, + "windows-2022": { "OSVmImage": "MMS2019", "Pool": "azsdk-pool-mms-win-2022-general" }, "ubuntu-1804": { "OSVmImage": "MMSUbuntu18.04", "Pool": "azsdk-pool-mms-ubuntu-1804-general" }, "macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" } }, @@ -558,4 +558,4 @@ Discovery finished in 75ms. [+] /home/ben/sdk/azure-sdk-tools/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 2.71s (725ms|1.93s) Tests completed in 4.33s Tests Passed: 141, Failed: 0, Skipped: 4 NotRun: 0 -``` +``` \ No newline at end of file diff --git a/eng/common/scripts/job-matrix/samples/matrix.json b/eng/common/scripts/job-matrix/samples/matrix.json index 98e1dd757f352..7ed770a9df8f3 100644 --- a/eng/common/scripts/job-matrix/samples/matrix.json +++ b/eng/common/scripts/job-matrix/samples/matrix.json @@ -5,7 +5,7 @@ "matrix": { "Agent": { "ubuntu": { "OSVmImage": "ubuntu-18.04", "Pool": "Azure Pipelines" }, - "windows": { "OSVmImage": "windows-2019", "Pool": "Azure Pipelines" }, + "windows": { "OSVmImage": "windows-2022", "Pool": "Azure Pipelines" }, "macOS": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" } }, "TestTargetFramework": [ "netcoreapp2.1", "net461", "net5.0" ] @@ -13,7 +13,7 @@ "include": [ { "Agent": { - "windows": { "OSVmImage": "windows-2019", "Pool": "Azure Pipelines" } + "windows": { "OSVmImage": "windows-2022", "Pool": "Azure Pipelines" } }, "TestTargetFramework": [ "net461", "net5.0" ], "AdditionalTestArguments": "/p:UseProjectReferenceToAzureClients=true" @@ -25,4 +25,4 @@ "framework": "netcoreapp2.1" } ] -} +} \ No newline at end of file diff --git a/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 b/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 index 7c327eb27dd0f..26e6514599695 100644 --- a/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 +++ b/eng/common/scripts/job-matrix/tests/job-matrix-functions.filter.tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { $matrixConfig = @" { "matrix": { - "operatingSystem": [ "windows-2019", "ubuntu-18.04", "macos-11" ], + "operatingSystem": [ "windows-2022", "ubuntu-18.04", "macos-11" ], "framework": [ "net461", "netcoreapp2.1" ], "additionalArguments": [ "", "mode=test" ] } @@ -17,8 +17,8 @@ BeforeAll { Describe "Matrix Filter" -Tag "filter" { It "Should filter by matrix display name" -TestCases @( - @{ regex = "windows.*"; expectedFirst = "windows2019_net461"; length = 4 } - @{ regex = "windows2019_netcoreapp21_modetest"; expectedFirst = "windows2019_netcoreapp21_modetest"; length = 1 } + @{ regex = "windows.*"; expectedFirst = "windows2022_net461"; length = 4 } + @{ regex = "windows2022_netcoreapp21_modetest"; expectedFirst = "windows2022_netcoreapp21_modetest"; length = 1 } @{ regex = ".*ubuntu.*"; expectedFirst = "ubuntu1804_net461"; length = 4 } ) { [array]$matrix = GenerateMatrix $config "all" $regex @@ -33,11 +33,11 @@ Describe "Matrix Filter" -Tag "filter" { } It "Should filter by matrix key/value" -TestCases @( - @{ filterString = "operatingSystem=windows.*"; expectedFirst = "windows2019_net461"; length = 4 } - @{ filterString = "operatingSystem=windows-2019"; expectedFirst = "windows2019_net461"; length = 4 } - @{ filterString = "framework=.*"; expectedFirst = "windows2019_net461"; length = 12 } - @{ filterString = "additionalArguments=mode=test"; expectedFirst = "windows2019_net461_modetest"; length = 6 } - @{ filterString = "additionalArguments=^$"; expectedFirst = "windows2019_net461"; length = 6 } + @{ filterString = "operatingSystem=windows.*"; expectedFirst = "windows2022_net461"; length = 4 } + @{ filterString = "operatingSystem=windows-2022"; expectedFirst = "windows2022_net461"; length = 4 } + @{ filterString = "framework=.*"; expectedFirst = "windows2022_net461"; length = 12 } + @{ filterString = "additionalArguments=mode=test"; expectedFirst = "windows2022_net461_modetest"; length = 6 } + @{ filterString = "additionalArguments=^$"; expectedFirst = "windows2022_net461"; length = 6 } ) { [array]$matrix = GenerateMatrix $config "all" -filters @($filterString) $matrix.Length | Should -Be $length @@ -45,8 +45,8 @@ Describe "Matrix Filter" -Tag "filter" { } It "Should filter by optional matrix key/value" -TestCases @( - @{ filterString = "operatingSystem=^$|windows.*"; expectedFirst = "windows2019_net461"; length = 4 } - @{ filterString = "doesnotexist=^$|.*"; expectedFirst = "windows2019_net461"; length = 12 } + @{ filterString = "operatingSystem=^$|windows.*"; expectedFirst = "windows2022_net461"; length = 4 } + @{ filterString = "doesnotexist=^$|.*"; expectedFirst = "windows2022_net461"; length = 12 } ) { [array]$matrix = GenerateMatrix $config "all" -filters @($filterString) $matrix.Length | Should -Be $length @@ -56,7 +56,7 @@ Describe "Matrix Filter" -Tag "filter" { It "Should handle multiple matrix key/value filters " { [array]$matrix = GenerateMatrix $config "all" -filters "operatingSystem=windows.*","framework=.*","additionalArguments=mode=test" $matrix.Length | Should -Be 2 - $matrix[0].Name | Should -Be "windows2019_net461_modetest" + $matrix[0].Name | Should -Be "windows2022_net461_modetest" } It "Should handle no matrix key/value filter matches" { @@ -81,4 +81,4 @@ Describe "Matrix Filter" -Tag "filter" { [array]$matrix = FilterMatrix $matrix @("foo=^$") $matrix.Length | Should -Be 12 } -} +} \ No newline at end of file diff --git a/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 b/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 index 689ed910837b4..5b0cb006668a9 100644 --- a/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 +++ b/eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1 @@ -10,7 +10,7 @@ BeforeAll { }, "matrix": { "operatingSystem": [ - "windows-2019", + "windows-2022", "ubuntu-18.04", "macos-11" ], @@ -25,14 +25,14 @@ BeforeAll { }, "include": [ { - "operatingSystem": "windows-2019", + "operatingSystem": "windows-2022", "framework": ["net461", "netcoreapp2.1", "net50"], "additionalArguments": "--enableWindowsFoo" } ], "exclude": [ { - "operatingSystem": "windows-2019", + "operatingSystem": "windows-2022", "framework": "net461" }, { @@ -273,7 +273,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { }, "matrix": { "operatingSystem": [ - "windows-2019", + "windows-2022", "ubuntu-18.04", "macos-11" ], @@ -288,7 +288,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { }, "include": [ { - "operatingSystem": "windows-2019", + "operatingSystem": "windows-2022", "framework": "net461", "additionalTestArguments": "/p:UseProjectReferenceToAzureClients=true" } @@ -315,7 +315,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { $matrix = GenerateFullMatrix $generateConfig.matrixParameters $generateconfig.displayNamesLookup $element = GetNdMatrixElement @(0, 0, 0) $matrix $dimensions - $element.name | Should -Be "windows2019_net461" + $element.name | Should -Be "windows2022_net461" $element = GetNdMatrixElement @(1, 1, 1) $matrix $dimensions $element.name | Should -Be "ubuntu1804_netcoreapp21_withFoo" @@ -330,7 +330,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { $matrix.Count | Should -Be 12 $element = $matrix[0].parameters - $element.operatingSystem | Should -Be "windows-2019" + $element.operatingSystem | Should -Be "windows-2022" $element.framework | Should -Be "net461" $element.additionalArguments | Should -Be "" @@ -346,7 +346,7 @@ Describe "Platform Matrix Generation" -Tag "generate" { } It "Should initialize a sparse matrix from an N-dimensional matrix" -TestCases @( - @{ i = 0; name = "windows2019_net461"; operatingSystem = "windows-2019"; framework = "net461"; additionalArguments = ""; } + @{ i = 0; name = "windows2022_net461"; operatingSystem = "windows-2022"; framework = "net461"; additionalArguments = ""; } @{ i = 1; name = "ubuntu1804_netcoreapp21_withfoo"; operatingSystem = "ubuntu-18.04"; framework = "netcoreapp2.1"; additionalArguments = "--enableFoo"; } @{ i = 2; name = "macOS11_net461"; operatingSystem = "macos-11"; framework = "net461"; additionalArguments = ""; } ) { @@ -380,7 +380,7 @@ Describe "Config File Object Conversion" -Tag "convert" { It "Should convert a matrix config" { $config.matrixParameters[0].Name | Should -Be "operatingSystem" - $config.matrixParameters[0].Flatten()[0].Value | Should -Be "windows-2019" + $config.matrixParameters[0].Flatten()[0].Value | Should -Be "windows-2022" $config.displayNamesLookup | Should -BeOfType [Hashtable] $config.displayNamesLookup["--enableFoo"] | Should -Be "withFoo" @@ -425,13 +425,13 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" { [Array]$matrix = GenerateMatrix $config "all" $matrix.Length | Should -Be 8 - $matrix[0].name | Should -Be "windows2019_netcoreapp21" - $matrix[0].parameters.operatingSystem | Should -Be "windows-2019" + $matrix[0].name | Should -Be "windows2022_netcoreapp21" + $matrix[0].parameters.operatingSystem | Should -Be "windows-2022" $matrix[0].parameters.framework | Should -Be "netcoreapp2.1" $matrix[0].parameters.additionalArguments | Should -Be "" - $matrix[1].name | Should -Be "windows2019_netcoreapp21_withfoo" - $matrix[1].parameters.operatingSystem | Should -Be "windows-2019" + $matrix[1].name | Should -Be "windows2022_netcoreapp21_withfoo" + $matrix[1].parameters.operatingSystem | Should -Be "windows-2022" $matrix[1].parameters.framework | Should -Be "netcoreapp2.1" $matrix[1].parameters.additionalArguments | Should -Be "--enableFoo" @@ -445,9 +445,9 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" { $matrix[4].parameters.operatingSystem | Should -Be "macos-11" $matrix[4].parameters.additionalArguments | Should -Be "" - $matrix[7].name | Should -Be "windows2019_net50_enableWindowsFoo" + $matrix[7].name | Should -Be "windows2022_net50_enableWindowsFoo" $matrix[7].parameters.framework | Should -Be "net50" - $matrix[7].parameters.operatingSystem | Should -Be "windows-2019" + $matrix[7].parameters.operatingSystem | Should -Be "windows-2022" $matrix[7].parameters.additionalArguments | Should -Be "--enableWindowsFoo" } @@ -456,7 +456,7 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" { { "include": [ { - "operatingSystem": "windows-2019", + "operatingSystem": "windows-2022", "framework": "net461" } ] @@ -466,14 +466,14 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" { $config = GetMatrixConfigFromJson $matrixConfigForIncludeOnly [Array]$matrix = GenerateMatrix $config "all" $matrix.Length | Should -Be 1 - $matrix[0].name | Should -Be "windows2019_net461" + $matrix[0].name | Should -Be "windows2022_net461" } It "Should parse a config with an empty include" { $matrixConfigForIncludeOnly = @" { "matrix": { - "operatingSystem": "windows-2019", + "operatingSystem": "windows-2022", "framework": "net461" } } @@ -482,7 +482,7 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" { $config = GetMatrixConfigFromJson $matrixConfigForIncludeOnly [Array]$matrix = GenerateMatrix $config "all" $matrix.Length | Should -Be 1 - $matrix[0].name | Should -Be "windows2019_net461" + $matrix[0].name | Should -Be "windows2022_net461" } } @@ -651,4 +651,4 @@ Describe "Platform Matrix Job and Display Names" -Tag "displaynames" { $matrix = GenerateMatrix $generateConfig "sparse" $matrix[0].name | Should -Be "ubuntu1804_net461_TestObjectValueName" } -} +} \ No newline at end of file