From 10c9b8cb931766280100dd3ea2eea4eccb003967 Mon Sep 17 00:00:00 2001 From: Konrad Jamrozik Date: Thu, 15 Dec 2022 00:03:59 -0800 Subject: [PATCH] Bump globals.yml .NET SDK version from 3.1.405 to 6.x + assorted changes (#4916) See https://github.com/Azure/azure-sdk-tools/pull/4916 --- .../archetype-sdk-tool-azure-function.yml | 5 +- .../archetype-sdk-tool-azure-webapp.yml | 2 +- .../stages/archetype-sdk-tool-dotnet.yml | 13 ++++ eng/pipelines/templates/variables/globals.yml | 2 +- src/dotnet/Azure.ClientSdk.Analyzers/ci.yml | 6 +- tools/CreateRuleFabricBot/ci.yml | 4 -- .../apiview/parsers/swagger-api-parser/ci.yml | 60 +++++++++---------- tools/code-owners-parser/ci.yml | 4 -- .../Azure.Sdk.Tools.GitHubIssues.Tests.csproj | 2 +- .../Azure.Sdk.Tools.GitHubIssues.csproj | 6 +- tools/http-fault-injector/ci.yml | 4 -- tools/identity-resolution/ci.yml | 4 -- tools/notification-configuration/ci.yml | 4 -- tools/pipeline-generator/ci.yml | 4 -- tools/snippet-generator/ci.yml | 4 -- .../cluster/kubernetes/generator/ci.yml | 4 -- tools/version-guard/ci.yml | 4 -- 17 files changed, 51 insertions(+), 81 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-sdk-tool-azure-function.yml b/eng/pipelines/templates/stages/archetype-sdk-tool-azure-function.yml index 4e53c9eaee1..9cacd5d15a4 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-tool-azure-function.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-tool-azure-function.yml @@ -12,12 +12,13 @@ stages: jobs: - job: BuildPackage pool: - vmImage: ubuntu-18.04 + name: azsdk-pool-mms-ubuntu-2004-general + vmImage: MMSUbuntu20.04 steps: - task: UseDotNet@2 displayName: Tools inputs: - version: '3.1.201' + version: '6.x' - pwsh: | dotnet build tools/${{ parameters.ToolName }} --configuration Release displayName: Build diff --git a/eng/pipelines/templates/stages/archetype-sdk-tool-azure-webapp.yml b/eng/pipelines/templates/stages/archetype-sdk-tool-azure-webapp.yml index ac2d147e216..b44de76cb0d 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-tool-azure-webapp.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-tool-azure-webapp.yml @@ -22,7 +22,7 @@ stages: - task: UseDotNet@2 displayName: Tools inputs: - version: '6.0.x' + version: '6.x' - pwsh: | dotnet build tools/${{ parameters.ToolName }} --configuration Release displayName: Build diff --git a/eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml b/eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml index 3f214e82052..ccf4e3a85dd 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml @@ -83,6 +83,19 @@ stages: BuildMatrix: ${{ parameters.StandaloneExeMatrix }} TargetDirectory: '${{ coalesce(parameters.PackageDirectory, parameters.ToolDirectory) }}' + # This step creates "$(Build.ArtifactStagingDirectory)/packages" directory if it doesn't exist. + # This step is necessary since migration to net6.0. This is because since net6.0, + # in case the "Build and Package" above would not output any packages to this directory, + # the "Publish to packages artifact" step below would fail on missing directory. + - pwsh: | + if (!(Test-Path -PathType container "$(Build.ArtifactStagingDirectory)/packages")) { + New-Item -ItemType Directory -Path "$(Build.ArtifactStagingDirectory)/packages" + Write-Host "Created directory $(Build.ArtifactStagingDirectory)/packages" + } else { + Write-Host "Directory $(Build.ArtifactStagingDirectory)/packages already exists. Nothing to do." + } + displayName: Create directory for packages to publish if absent + - publish: $(Build.ArtifactStagingDirectory)/packages displayName: Publish to packages artifact artifact: packages diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index a3b016da990..56d38275183 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -1,6 +1,6 @@ variables: OfficialBuildId: $(Build.BuildNumber) skipComponentGovernanceDetection: true - DotNetCoreVersion: '3.1.405' + DotNetCoreVersion: '6.x' NotificationsCreatorVersion: '1.0.0-dev.20221011.1' PipelineOwnersExtractorVersion: '1.0.0-dev.20221011.1' diff --git a/src/dotnet/Azure.ClientSdk.Analyzers/ci.yml b/src/dotnet/Azure.ClientSdk.Analyzers/ci.yml index 3db1be1067a..1a69de1d14d 100644 --- a/src/dotnet/Azure.ClientSdk.Analyzers/ci.yml +++ b/src/dotnet/Azure.ClientSdk.Analyzers/ci.yml @@ -24,8 +24,4 @@ pr: extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: - ToolDirectory: src/dotnet/Azure.ClientSdk.Analyzers - # As of 12/11/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 \ No newline at end of file + ToolDirectory: src/dotnet/Azure.ClientSdk.Analyzers \ No newline at end of file diff --git a/tools/CreateRuleFabricBot/ci.yml b/tools/CreateRuleFabricBot/ci.yml index 3056843fa4c..cfdb3f9dbea 100644 --- a/tools/CreateRuleFabricBot/ci.yml +++ b/tools/CreateRuleFabricBot/ci.yml @@ -25,7 +25,3 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/CreateRuleFabricBot - # As of 12/10/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 diff --git a/tools/apiview/parsers/swagger-api-parser/ci.yml b/tools/apiview/parsers/swagger-api-parser/ci.yml index 0e0948cd6bb..e0fb7cf422e 100644 --- a/tools/apiview/parsers/swagger-api-parser/ci.yml +++ b/tools/apiview/parsers/swagger-api-parser/ci.yml @@ -1,32 +1,28 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - release/* - - hotfix/* - paths: - include: - - tools/apiview/parsers/swagger-api-parser - -pr: - branches: - include: - - main - - feature/* - - release/* - - hotfix/* - paths: - include: - - tools/apiview/parsers/swagger-api-parser - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml - parameters: - PackageDirectory: $(Build.SourcesDirectory)/tools/apiview/parsers/swagger-api-parser/SwaggerApiParser - TestDirectory: $(Build.SourcesDirectory)/tools/apiview/parsers/swagger-api-parser/SwaggerApiParserTest - # As of 12/11/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + paths: + include: + - tools/apiview/parsers/swagger-api-parser + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + paths: + include: + - tools/apiview/parsers/swagger-api-parser + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml + parameters: + PackageDirectory: $(Build.SourcesDirectory)/tools/apiview/parsers/swagger-api-parser/SwaggerApiParser + TestDirectory: $(Build.SourcesDirectory)/tools/apiview/parsers/swagger-api-parser/SwaggerApiParserTest diff --git a/tools/code-owners-parser/ci.yml b/tools/code-owners-parser/ci.yml index 7ff10c69578..5cbd4fb6037 100644 --- a/tools/code-owners-parser/ci.yml +++ b/tools/code-owners-parser/ci.yml @@ -26,10 +26,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/code-owners-parser - # As of 12/11/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 # As of 12/11/2022 temporarily disabling TestPostSteps because the # get-codeowners.ps1 script uses the codeowners-parser NuGet package # which has net5.0, not net6.0, which causes it to fail. diff --git a/tools/github-issues/Azure.Sdk.Tools.GitHubIssues.Tests/Azure.Sdk.Tools.GitHubIssues.Tests.csproj b/tools/github-issues/Azure.Sdk.Tools.GitHubIssues.Tests/Azure.Sdk.Tools.GitHubIssues.Tests.csproj index fb35d61b36f..919a7583bf7 100644 --- a/tools/github-issues/Azure.Sdk.Tools.GitHubIssues.Tests/Azure.Sdk.Tools.GitHubIssues.Tests.csproj +++ b/tools/github-issues/Azure.Sdk.Tools.GitHubIssues.Tests/Azure.Sdk.Tools.GitHubIssues.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 false diff --git a/tools/github-issues/Azure.Sdk.Tools.GitHubIssues/Azure.Sdk.Tools.GitHubIssues.csproj b/tools/github-issues/Azure.Sdk.Tools.GitHubIssues/Azure.Sdk.Tools.GitHubIssues.csproj index b4d169ba749..de7c2b144e5 100644 --- a/tools/github-issues/Azure.Sdk.Tools.GitHubIssues/Azure.Sdk.Tools.GitHubIssues.csproj +++ b/tools/github-issues/Azure.Sdk.Tools.GitHubIssues/Azure.Sdk.Tools.GitHubIssues.csproj @@ -1,6 +1,6 @@ - + - netcoreapp3.1 + net6.0 v3 $(NoWarn);8002 @@ -12,7 +12,7 @@ - + diff --git a/tools/http-fault-injector/ci.yml b/tools/http-fault-injector/ci.yml index 0f303c344a0..5e9ca989e80 100644 --- a/tools/http-fault-injector/ci.yml +++ b/tools/http-fault-injector/ci.yml @@ -25,7 +25,3 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/http-fault-injector - # As of 12/11/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 diff --git a/tools/identity-resolution/ci.yml b/tools/identity-resolution/ci.yml index 6800e9ce4b6..2f2ba1eeb23 100644 --- a/tools/identity-resolution/ci.yml +++ b/tools/identity-resolution/ci.yml @@ -25,7 +25,3 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/identity-resolution - # As of 12/11/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 diff --git a/tools/notification-configuration/ci.yml b/tools/notification-configuration/ci.yml index 63e4917631a..a7055e35ef1 100644 --- a/tools/notification-configuration/ci.yml +++ b/tools/notification-configuration/ci.yml @@ -29,7 +29,3 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/notification-configuration - # As of 12/11/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 diff --git a/tools/pipeline-generator/ci.yml b/tools/pipeline-generator/ci.yml index ea7e1425c94..65862d80c9d 100644 --- a/tools/pipeline-generator/ci.yml +++ b/tools/pipeline-generator/ci.yml @@ -25,7 +25,3 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/pipeline-generator - # As of 12/10/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 diff --git a/tools/snippet-generator/ci.yml b/tools/snippet-generator/ci.yml index fa1d12b3e74..92ea5cccd50 100644 --- a/tools/snippet-generator/ci.yml +++ b/tools/snippet-generator/ci.yml @@ -25,7 +25,3 @@ extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/snippet-generator - # As of 12/11/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 diff --git a/tools/stress-cluster/cluster/kubernetes/generator/ci.yml b/tools/stress-cluster/cluster/kubernetes/generator/ci.yml index 1bd32d104ab..5b8a8f52c01 100644 --- a/tools/stress-cluster/cluster/kubernetes/generator/ci.yml +++ b/tools/stress-cluster/cluster/kubernetes/generator/ci.yml @@ -19,7 +19,3 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/stress-cluster/cluster/kubernetes/generator - # As of 12/11/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403 diff --git a/tools/version-guard/ci.yml b/tools/version-guard/ci.yml index b1563d24b6c..21388068210 100644 --- a/tools/version-guard/ci.yml +++ b/tools/version-guard/ci.yml @@ -25,7 +25,3 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/version-guard - # As of 12/10/2022 this is a temporary override until the globally-set - # SDK is set to net6.0. For details, please see: - # https://github.com/Azure/azure-sdk-tools/pull/4916 - DotNetCoreVersion: 6.0.403