From 9c28334c63a48fbad638d8fdf577b35c67352cad Mon Sep 17 00:00:00 2001 From: YuliiaKovalova Date: Sun, 31 Aug 2025 08:19:36 +0200 Subject: [PATCH 1/2] add signtype to parameters --- .vsts-dotnet.yml | 6 +++++- azure-pipelines/.vsts-dotnet-build-jobs.yml | 11 +++++++---- azure-pipelines/.vsts-dotnet-exp-perf.yml | 6 +++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index 97130cad692..2568b0475a3 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -6,7 +6,6 @@ trigger: # Once they exist, we should define these as "runtime parameters" # https://github.com/Microsoft/azure-pipelines-yaml/pull/129 # variables: -# SignType: real # SkipApplyOptimizationData: false parameters: @@ -18,6 +17,10 @@ parameters: displayName: Enable Signing Validation type: boolean default: true +- name: signTypeParameter + displayName: Sign Type + type: string + default: 'real' variables: - group: DotNet-Blob-Feed @@ -74,6 +77,7 @@ extends: parameters: isExperimental: false enableComponentGovernance: true + signTypeParameter: ${{ parameters.signTypeParameter }} - template: /eng/common/templates-official/post-build/post-build.yml@self parameters: diff --git a/azure-pipelines/.vsts-dotnet-build-jobs.yml b/azure-pipelines/.vsts-dotnet-build-jobs.yml index ae8b6170b9c..a6d8fb47d6f 100644 --- a/azure-pipelines/.vsts-dotnet-build-jobs.yml +++ b/azure-pipelines/.vsts-dotnet-build-jobs.yml @@ -6,6 +6,9 @@ parameters: - name: enableComponentGovernance type: boolean default: false +- name: signTypeParameter + type: string + default: 'test' jobs: - job: Windows_NT @@ -43,14 +46,14 @@ jobs: - task: MicroBuildSigningPlugin@4 displayName: Install MicroBuild plugin inputs: - signType: $(SignType) + signType: ${{ parameters.signTypeParameter }} zipSources: false feedSource: https://devdiv.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - ${{ if and(eq(variables['SignType'], 'real'), eq(variables['System.TeamProject'], 'DevDiv')) }}: + ${{ if and(eq(parameters.signTypeParameter, 'real'), eq(variables['System.TeamProject'], 'DevDiv')) }}: ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) - condition: and(succeeded(), in(variables['SignType'], 'test', 'real')) + condition: and(succeeded(), in('${{ parameters.signTypeParameter }}', 'test', 'real')) - task: MicroBuildOptProfPlugin@6 inputs: @@ -73,7 +76,7 @@ jobs: /p:VisualStudioIbcSourceBranchName=$(SourceBranch) /p:VisualStudioDropAccessToken=$(System.AccessToken) /p:VisualStudioDropName=$(VisualStudio.DropName) - /p:DotNetSignType=$(SignType) + /p:DotNet=${{ parameters.signTypeParameter }} /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json diff --git a/azure-pipelines/.vsts-dotnet-exp-perf.yml b/azure-pipelines/.vsts-dotnet-exp-perf.yml index 33ea1e6fc91..c5fb9cd2e97 100644 --- a/azure-pipelines/.vsts-dotnet-exp-perf.yml +++ b/azure-pipelines/.vsts-dotnet-exp-perf.yml @@ -5,7 +5,6 @@ trigger: # Once they exist, we should define these as "runtime parameters" # https://github.com/Microsoft/azure-pipelines-yaml/pull/129 # variables: -# SignType: test # SkipApplyOptimizationData: false parameters: @@ -17,6 +16,10 @@ parameters: displayName: Enable Signing Validation type: boolean default: false +- name: signTypeParameter + displayName: Sign Type + type: string + default: 'test' variables: # if OptProfDrop is not set, string '$(OptProfDrop)' will be passed to the build script. @@ -72,6 +75,7 @@ extends: parameters: isExperimental: true enableComponentGovernance: false + signTypeParameter: ${{ parameters.signTypeParameter }} - template: /eng/common/templates/post-build/post-build.yml@self parameters: From c04040f85d580e8d42490c669087a69e60f05101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Provazn=C3=ADk?= Date: Mon, 1 Sep 2025 10:25:59 +0200 Subject: [PATCH 2/2] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- azure-pipelines/.vsts-dotnet-build-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/.vsts-dotnet-build-jobs.yml b/azure-pipelines/.vsts-dotnet-build-jobs.yml index a6d8fb47d6f..402066960b4 100644 --- a/azure-pipelines/.vsts-dotnet-build-jobs.yml +++ b/azure-pipelines/.vsts-dotnet-build-jobs.yml @@ -76,7 +76,7 @@ jobs: /p:VisualStudioIbcSourceBranchName=$(SourceBranch) /p:VisualStudioDropAccessToken=$(System.AccessToken) /p:VisualStudioDropName=$(VisualStudio.DropName) - /p:DotNet=${{ parameters.signTypeParameter }} + /p:DotNetSignType=${{ parameters.signTypeParameter }} /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json