Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where applicable, update Windows pools used to azsdk-pool-mms-win-2022-general and rename vmImage to the windows-20xx format #18

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
jobs:
- job: CreateDocIndex
pool:
vmImage: windows-2019
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
Expand All @@ -19,7 +20,7 @@ jobs:
displayName: 'Generate Doc Index'
inputs:
pwsh: true
filePath: $(Build.SourcesDirectory)/eng/common/docgeneration/Generate-DocIndex.ps1
filePath: $(Build.SourcesDirectory)/eng/common/docgeneration/Generate-DocIndex.ps1
arguments: >
-Docfx $(docfxPath)
-RepoRoot $(Build.SourcesDirectory)
Expand All @@ -38,14 +39,14 @@ jobs:
Copy-Item -Path $(Build.SourcesDirectory)/eng/* -Destination ./ -Recurse -Force
echo "##vso[task.setvariable variable=toolPath]$(Build.BinariesDirectory)"
workingDirectory: $(Build.BinariesDirectory)
displayName: Move eng/common to Tool Directory
displayName: Move eng/common to Tool Directory

- task: PublishPipelineArtifact@0
condition: succeeded()
inputs:
artifactName: "Doc.Index"
targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site

- pwsh: |
git checkout -b gh-pages-local --track origin/gh-pages-root -f
workingDirectory: $(Build.SourcesDirectory)
Expand All @@ -68,4 +69,4 @@ jobs:
-PRBranchName "gh-pages"
-CommitMsg "Auto-generated docs from SHA(s) $(Build.SourceVersion)"
-GitUrl "https://$(azuresdk-github-pat)@github.com/$(Build.Repository.Name).git"
-PushArgs "--force"
-PushArgs "--force"
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
jobs:
- job: CreateDocIndex
pool:
vmImage: windows-2019
name: azsdk-pool-mms-win-2022-general
vmImage: windows-2022
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
Expand All @@ -19,7 +20,7 @@ jobs:
displayName: 'Generate Doc Index'
inputs:
pwsh: true
filePath: $(Build.SourcesDirectory)/eng/common/docgeneration/Generate-DocIndex.ps1
filePath: $(Build.SourcesDirectory)/eng/common/docgeneration/Generate-DocIndex.ps1
arguments: >
-Docfx $(docfxPath)
-RepoRoot $(Build.SourcesDirectory)
Expand All @@ -38,14 +39,14 @@ jobs:
Copy-Item -Path $(Build.SourcesDirectory)/eng/* -Destination ./ -Recurse -Force
echo "##vso[task.setvariable variable=toolPath]$(Build.BinariesDirectory)"
workingDirectory: $(Build.BinariesDirectory)
displayName: Move eng/common to Tool Directory
displayName: Move eng/common to Tool Directory

- task: PublishPipelineArtifact@0
condition: succeeded()
inputs:
artifactName: "Doc.Index"
targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site

- pwsh: |
git checkout -b gh-pages-local --track origin/gh-pages-root -f
workingDirectory: $(Build.SourcesDirectory)
Expand All @@ -68,4 +69,4 @@ jobs:
-PRBranchName "gh-pages"
-CommitMsg "Auto-generated docs from SHA(s) $(Build.SourceVersion)"
-GitUrl "https://$(azuresdk-github-pat)@github.com/$(Build.Repository.Name).git"
-PushArgs "--force"
-PushArgs "--force"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function Throw-InvalidOperatingSystem {
throw "Invalid operating system detected. Operating system was: $([System.Runtime.InteropServices.RuntimeInformation]::OSDescription), expected image was: $AgentImage"
}

if ($IsWindows -and $AgentImage -match "windows|win|MMS2019") {
if ($IsWindows -and $AgentImage -match "windows|win|windows-2022") {
$osName = "Windows"
} elseif ($IsLinux -and $AgentImage -match "ubuntu") {
$osName = "Linux"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Example:
```
"matrix": {
"operatingSystem": [
"windows-2019",
"windows-2022",
"ubuntu-18.04",
"macOS-10.15"
],
Expand Down Expand Up @@ -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"
}
}
```
Expand Down Expand Up @@ -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": "windows-2022", "Pool": "azsdk-pool-mms-win-2022-general" },
"ubuntu-1804": { "OSVmImage": "MMSUbuntu18.04", "Pool": "azsdk-pool-mms-ubuntu-1804-general" },
"macOS-10.15": { "OSVmImage": "macOS-10.15", "Pool": "Azure Pipelines" }
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
"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-10.15", "Pool": "Azure Pipelines" }
},
"TestTargetFramework": [ "netcoreapp2.1", "net461", "net5.0" ]
},
"include": [
{
"Agent": {
"windows": { "OSVmImage": "windows-2019", "Pool": "Azure Pipelines" }
"windows": { "OSVmImage": "windows-2022", "Pool": "Azure Pipelines" }
},
"TestTargetFramework": [ "net461", "net5.0" ],
"AdditionalTestArguments": "/p:UseProjectReferenceToAzureClients=true"
}
],
"exclude": [
{
"OSVmImage": "MMS2019",
"OSVmImage": "windows-2022",
"framework": "netcoreapp2.1"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BeforeAll {
$matrixConfig = @"
{
"matrix": {
"operatingSystem": [ "windows-2019", "ubuntu-18.04", "macOS-10.15" ],
"operatingSystem": [ "windows-2022", "ubuntu-18.04", "macOS-10.15" ],
"framework": [ "net461", "netcoreapp2.1" ],
"additionalArguments": [ "", "mode=test" ]
}
Expand All @@ -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
Expand All @@ -33,20 +33,20 @@ 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
$matrix[0].Name | Should -Be $expectedFirst
}

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
Expand All @@ -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" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BeforeAll {
},
"matrix": {
"operatingSystem": [
"windows-2019",
"windows-2022",
"ubuntu-18.04",
"macOS-10.15"
],
Expand All @@ -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"
},
{
Expand Down Expand Up @@ -228,17 +228,17 @@ Describe "Matrix-Reverse-Lookup" -Tag "lookup" {
@{ index = 1; expected = @(0,0,0,1) }
@{ index = 2; expected = @(0,0,0,2) }
@{ index = 3; expected = @(0,0,0,3) }

@{ index = 4; expected = @(0,0,1,0) }
@{ index = 5; expected = @(0,0,1,1) }
@{ index = 6; expected = @(0,0,1,2) }
@{ index = 7; expected = @(0,0,1,3) }

@{ index = 8; expected = @(0,1,0,0) }
@{ index = 9; expected = @(0,1,0,1) }
@{ index = 10; expected = @(0,1,0,2) }
@{ index = 11; expected = @(0,1,0,3) }

@{ index = 12; expected = @(0,1,1,0) }
@{ index = 13; expected = @(0,1,1,1) }
@{ index = 14; expected = @(0,1,1,2) }
Expand Down Expand Up @@ -273,7 +273,7 @@ Describe "Platform Matrix Generation" -Tag "generate" {
},
"matrix": {
"operatingSystem": [
"windows-2019",
"windows-2022",
"ubuntu-18.04",
"macOS-10.15"
],
Expand All @@ -288,7 +288,7 @@ Describe "Platform Matrix Generation" -Tag "generate" {
},
"include": [
{
"operatingSystem": "windows-2019",
"operatingSystem": "windows-2022",
"framework": "net461",
"additionalTestArguments": "/p:UseProjectReferenceToAzureClients=true"
}
Expand All @@ -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"
Expand All @@ -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 ""

Expand All @@ -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 = "macOS1015_net461"; operatingSystem = "macOS-10.15"; framework = "net461"; additionalArguments = ""; }
) {
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand All @@ -445,9 +445,9 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" {
$matrix[4].parameters.operatingSystem | Should -Be "macOS-10.15"
$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"
}

Expand All @@ -456,7 +456,7 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" {
{
"include": [
{
"operatingSystem": "windows-2019",
"operatingSystem": "windows-2022",
"framework": "net461"
}
]
Expand All @@ -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"
}
}
Expand All @@ -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"
}
}

Expand Down
Loading