Skip to content

Commit

Permalink
Update Ubuntu 18.04 to 2X.04 ; update MMSUbuntu2X.04 to `ubuntu…
Browse files Browse the repository at this point in the history
…-2X.04` (#6004)

* Migrate Ubuntu 18.04 to 20.04 or 22.04, as appropriate

* MMSUbuntu22.04 -> ubuntu22.04

* MMSUbuntu20.04 --> ubuntu-20.04

* revert sdk-testgen ci.yml to MMSUbuntu22
  • Loading branch information
Konrad Jamrozik authored Apr 20, 2023
1 parent 7fba2fd commit 80de661
Show file tree
Hide file tree
Showing 43 changed files with 81 additions and 81 deletions.
14 changes: 7 additions & 7 deletions doc/common/matrix_generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ For example, given a matrix config like below:
{
"matrix": {
"Agent": {
"ubuntu-2204": { "OSVmImage": "MMSUbuntu22.04", "Pool": "azsdk-pool-mms-ubuntu-2204-general" }
"ubuntu-2204": { "OSVmImage": "ubuntu-22.04", "Pool": "azsdk-pool-mms-ubuntu-2204-general" }
},
"JavaTestVersion": [ "1.8", "1.11" ]
}
Expand All @@ -618,12 +618,12 @@ The normal matrix output (without replacements), looks like:
$ ./Create-JobMatrix.ps1 -ConfigPath <test> -Selection all
{
"ubuntu2204_18": {
"OSVmImage": "MMSUbuntu22.04",
"OSVmImage": "ubuntu-22.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"JavaTestVersion": "1.8"
},
"ubuntu2204_111": {
"OSVmImage": "MMSUbuntu18.04",
"OSVmImage": "ubuntu-22.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-general",
"JavaTestVersion": "1.11"
}
Expand All @@ -640,12 +640,12 @@ $ $replacements = @('.*Version=1.11/2.0', 'Pool=(.*ubuntu.*)-general/$1-custom')
$ ../Create-JobMatrix.ps1 -ConfigPath ./test.Json -Selection all -Replace $replacements
{
"ubuntu2204_18": {
"OSVmImage": "MMSUbuntu22.04",
"OSVmImage": "ubuntu-22.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-custom",
"JavaTestVersion": "1.8"
},
"ubuntu1804_20": {
"OSVmImage": "MMSUbuntu22.04",
"ubuntu2204_20": {
"OSVmImage": "ubuntu-22.04",
"Pool": "azsdk-pool-mms-ubuntu-2204-custom",
"JavaTestVersion": "2.0"
}
Expand All @@ -672,7 +672,7 @@ Given a matrix like below with `JavaTestVersion` marked as a non-sparse paramete
"matrix": {
"Agent": {
"windows-2022": { "OSVmImage": "windows-2022", "Pool": "azsdk-pool-mms-win-2022-general" },
"ubuntu-2204": { "OSVmImage": "MMSUbuntu22.04", "Pool": "azsdk-pool-mms-ubuntu-2204-general" },
"ubuntu-2204": { "OSVmImage": "ubuntu-22.04", "Pool": "azsdk-pool-mms-ubuntu-2204-general" },
"macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
},
"JavaTestVersion": [ "1.8", "1.11" ],
Expand Down
2 changes: 1 addition & 1 deletion eng/common-tests/matrix-generator/samples/matrix-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
JobTemplatePath: /eng/common-tests/matrix-generator/samples/matrix-job-sample.yml
AdditionalParameters: {}
Pool: Azure Pipelines
OsVmImage: ubuntu-18.04
OsVmImage: ubuntu-20.04
CloudConfig:
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
Location: eastus2
Expand Down
2 changes: 1 addition & 1 deletion eng/common-tests/matrix-generator/samples/matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"matrix": {
"Agent": {
"ubuntu": { "OSVmImage": "ubuntu-18.04", "Pool": "Azure Pipelines" },
"ubuntu": { "OSVmImage": "ubuntu-20.04", "Pool": "Azure Pipelines" },
"windows": { "OSVmImage": "windows-2022", "Pool": "Azure Pipelines" },
"macOS": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BeforeAll {
$matrixConfig = @"
{
"matrix": {
"operatingSystem": [ "windows-2022", "ubuntu-18.04", "macos-11" ],
"operatingSystem": [ "windows-2022", "ubuntu-20.04", "macos-11" ],
"framework": [ "net461", "netcoreapp2.1" ],
"additionalArguments": [ "", "mode=test" ]
}
Expand All @@ -19,7 +19,7 @@ Describe "Matrix Filter" -Tag "UnitTest", "filter" {
It "Should filter by matrix display name" -TestCases @(
@{ regex = "windows.*"; expectedFirst = "windows2022_net461"; length = 4 }
@{ regex = "windows2022_netcoreapp21_modetest"; expectedFirst = "windows2022_netcoreapp21_modetest"; length = 1 }
@{ regex = ".*ubuntu.*"; expectedFirst = "ubuntu1804_net461"; length = 4 }
@{ regex = ".*ubuntu.*"; expectedFirst = "ubuntu2004_net461"; length = 4 }
) {
[array]$matrix = GenerateMatrix $config "all" $regex
$matrix.Length | Should -Be $length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ Describe "Platform Matrix Replace" -Tag "UnitTest", "replace" {
{
"matrix": {
"Agent": {
"ubuntu-1804": { "OSVmImage": "MMSUbuntu18.04", "Pool": "azsdk-pool-mms-ubuntu-1804-general" }
"ubuntu-2004": { "OSVmImage": "ubuntu-20.04", "Pool": "azsdk-pool-mms-ubuntu-2004-general" }
},
"JavaTestVersion": [ "1.8", "1.11" ]
}
Expand All @@ -501,16 +501,16 @@ Describe "Platform Matrix Replace" -Tag "UnitTest", "replace" {

$matrix.Length | Should -Be 2
# Replacements of inner values will preserve the grouping name
$matrix[0].name | Should -Be "ubuntu1804_20"
$matrix[0].name | Should -Be "ubuntu2004_20"
$matrix[0].parameters.JavaTestVersion | Should -Be "2.0"
$matrix[0].parameters.Pool | Should -Be "custom-ubuntu-pool"
$matrix[0].parameters.OSVmImage | Should -Be "MMSUbuntu18.04"
$matrix[0].parameters.OSVmImage | Should -Be "ubuntu-20.04"

# Make sure non-literal keys still replace under the hood
$matrix = GenerateMatrix $importConfig "all" -replace ".*=.*ubuntu.*/custom-ubuntu-pool"

$matrix.Length | Should -Be 2
$matrix[0].name | Should -Be "ubuntu1804_18"
$matrix[0].name | Should -Be "ubuntu2004_18"
$matrix[0].parameters.Pool | Should -Be "custom-ubuntu-pool"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BeforeAll {
"matrix": {
"operatingSystem": [
"windows-2022",
"ubuntu-18.04",
"ubuntu-20.04",
"macos-11"
],
"framework": [
Expand Down Expand Up @@ -40,7 +40,7 @@ BeforeAll {
"framework": "netcoreapp2.1"
},
{
"operatingSystem": ["macos-11", "ubuntu-18.04"],
"operatingSystem": ["macos-11", "ubuntu-20.04"],
"additionalArguments": "--enableFoo"
}
]
Expand Down Expand Up @@ -274,7 +274,7 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" {
"matrix": {
"operatingSystem": [
"windows-2022",
"ubuntu-18.04",
"ubuntu-20.04",
"macos-11"
],
"framework": [
Expand Down Expand Up @@ -318,7 +318,7 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" {
$element.name | Should -Be "windows2022_net461"

$element = GetNdMatrixElement @(1, 1, 1) $matrix $dimensions
$element.name | Should -Be "ubuntu1804_netcoreapp21_withFoo"
$element.name | Should -Be "ubuntu2004_netcoreapp21_withFoo"

$element = GetNdMatrixElement @(2, 1, 1) $matrix $dimensions
$element.name | Should -Be "macOS11_netcoreapp21_withFoo"
Expand All @@ -335,7 +335,7 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" {
$element.additionalArguments | Should -Be ""

$element = GetNdMatrixElement @(1, 1, 1) $matrix $dimensions
$element.parameters.operatingSystem | Should -Be "ubuntu-18.04"
$element.parameters.operatingSystem | Should -Be "ubuntu-20.04"
$element.parameters.framework | Should -Be "netcoreapp2.1"
$element.parameters.additionalArguments | Should -Be "--enableFoo"

Expand All @@ -347,7 +347,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 = "ubuntu1804_netcoreapp21_withfoo"; operatingSystem = "ubuntu-18.04"; framework = "netcoreapp2.1"; additionalArguments = "--enableFoo"; }
@{ 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 = ""; }
) {
$sparseMatrix = GenerateSparseMatrix $generateConfig.matrixParameters $generateConfig.displayNamesLookup
Expand Down Expand Up @@ -435,9 +435,9 @@ Describe "Platform Matrix Post Transformation" -Tag "UnitTest", "transform" {
$matrix[1].parameters.framework | Should -Be "netcoreapp2.1"
$matrix[1].parameters.additionalArguments | Should -Be "--enableFoo"

$matrix[2].name | Should -Be "ubuntu1804_net461"
$matrix[2].name | Should -Be "ubuntu2004_net461"
$matrix[2].parameters.framework | Should -Be "net461"
$matrix[2].parameters.operatingSystem | Should -Be "ubuntu-18.04"
$matrix[2].parameters.operatingSystem | Should -Be "ubuntu-20.04"
$matrix[2].parameters.additionalArguments | Should -Be ""

$matrix[4].name | Should -Be "macOS11_net461"
Expand Down Expand Up @@ -580,7 +580,7 @@ Describe "Platform Matrix Job and Display Names" -Tag "UnitTest", "displaynames"
"--enableFoo": "withfoo"
},
"matrix": {
"operatingSystem": "ubuntu-18.04",
"operatingSystem": "ubuntu-20.04",
"framework": [
"net461",
"netcoreapp2.1"
Expand All @@ -603,18 +603,18 @@ Describe "Platform Matrix Job and Display Names" -Tag "UnitTest", "displaynames"
$generateconfig.displayNamesLookup["netcoreapp2.1"] = (New-Object string[] 150) -join "a"
$matrix = GenerateFullMatrix $generateconfig.matrixParameters $generateconfig.displayNamesLookup

$matrix[0].name | Should -Be "ubuntu1804_123some456invalid_formatnamefoo_TestObjectValueName"
$matrix[0].name | Should -Be "ubuntu2004_123some456invalid_formatnamefoo_TestObjectValueName"

$matrix[1].name.Length | Should -Be 100
# The withfoo part of the argument gets cut off at the character limit
$matrix[1].name | Should -BeLike "ubuntu1804_aaaaaaaaaaaaaaaaa*"
$matrix[1].name | Should -BeLike "ubuntu2004_aaaaaaaaaaaaaaaaa*"
}

It "Should create a valid display name when there are leading numbers" {
$generateconfig.displayNamesLookup["ubuntu-18.04"] = '123_ubuntu1804'
$generateconfig.displayNamesLookup["ubuntu-20.04"] = '123_ubuntu2004'
$matrix = GenerateFullMatrix $generateconfig.matrixParameters $generateconfig.displayNamesLookup

$matrix[0].name | Should -Be "job_123_ubuntu1804_net461_TestObjectValueName"
$matrix[0].name | Should -Be "job_123_ubuntu2004_net461_TestObjectValueName"
}

It "Should create a valid job name when there are leading numbers" {
Expand Down Expand Up @@ -649,6 +649,6 @@ Describe "Platform Matrix Job and Display Names" -Tag "UnitTest", "displaynames"

It "Should generate a display name with null and object values" {
$matrix = GenerateMatrix $generateConfig "sparse"
$matrix[0].name | Should -Be "ubuntu1804_net461_TestObjectValueName"
$matrix[0].name | Should -Be "ubuntu2004_net461_TestObjectValueName"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ parameters:
default: azsdk-pool-mms-ubuntu-2204-general
- name: OsVmImage
type: string
default: MMSUbuntu22.04
default: ubuntu-22.04
# This parameter is only necessary if there are multiple invocations of this template within the SAME STAGE.
# When that occurs, provide a name other than the default value.
- name: GenerateJobName
Expand Down
2 changes: 1 addition & 1 deletion eng/common/pipelines/templates/jobs/prepare-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- job: PreparePipelines
pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04
steps:
- template: /eng/common/pipelines/templates/steps/install-pipeline-generation.yml
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ stages:
Image: windows-2022
Linux:
Pool: azsdk-pool-mms-ubuntu-2204-general
Image: MMSUbuntu22.04
Image: ubuntu-22.04
Mac:
Pool: Azure Pipelines
Image: macos-11
Expand Down
6 changes: 3 additions & 3 deletions eng/containers/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ parameters:
default:
- name: mock_attestation
pool: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04
dockerRepo: 'keyvault-mock-attestation'
dockerFile: 'tools/keyvault-mock-attestation/Dockerfile'
stableTags:
- 'latest'
- name: stress_watcher
pool: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04
dockerRepo: 'stress/watcher'
dockerFile: 'tools/stress-cluster/services/Stress.Watcher/Dockerfile'
stableTags:
- 'latest'
- name: stress_deploy_test_resources
pool: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04
dockerRepo: 'stress/deploy-test-resources'
prepareScript: tools/stress-cluster/cluster/kubernetes/stress-test-addons/images/test-resource-deployer/prepare.ps1
dockerFile: 'tools/stress-cluster/cluster/kubernetes/stress-test-addons/images/test-resource-deployer/Dockerfile'
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/apiview-review-gen-cadl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

variables:
NodeVersion: '18.x'
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/apiview-review-gen-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ trigger: none

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

parameters:
- name: Reviews
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/apiview-review-gen-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ trigger: none

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

parameters:
- name: Reviews
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/apiview-review-gen-typespec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

variables:
NodeVersion: '18.x'
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/doc-warden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

steps:

Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/eng-common-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pr:

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

stages:
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/git-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
displayName: "Delete ${{parameters.TagName}} tag from ${{parameters.Repository}} repository"
environment: github-operation-approvals
pool:
name: azsdk-pool-mms-ubuntu-1804-general
name: azsdk-pool-mms-ubuntu-2004-general
strategy:
runOnce:
deploy:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/githubio-linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pr: none

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

variables:
cachefile: verify-links-cache.txt
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/live-test-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ stages:
timeoutInMinutes: 0
pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

steps:
- template: /eng/common/pipelines/templates/steps/cache-ps-modules.yml
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/merge-docs-main-to-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
displayName: 'ReleaseDocsMs: ${{repo.RepoName}}'
pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04
variables:
DocRepoLocation: $(Pipeline.Workspace)/docs
steps:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/mirror-pypi-to-dev-feed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

variables:
- template: /eng/pipelines/templates/variables/globals.yml
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/mirror-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pr: none

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

jobs:
- job: SyncRepos
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ stages:

pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: MMSUbuntu22.04
vmImage: ubuntu-22.04

variables:
Organization: azure-sdk
Expand Down
Loading

0 comments on commit 80de661

Please sign in to comment.