From b7ccaed202634e6c2f8ee0d6a9883007e9a3d1e5 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 12:40:52 -0700 Subject: [PATCH 01/12] Release build --- tools/releaseBuild/release.yml | 153 +++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 tools/releaseBuild/release.yml diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml new file mode 100644 index 00000000..03fb19a8 --- /dev/null +++ b/tools/releaseBuild/release.yml @@ -0,0 +1,153 @@ +name: PlatyPS-Release-$(Build.BuildId) +trigger: none + +pr: + branches: + include: + - v2 + - release/v2/* + +variables: + - group: ESRP + - name: DOTNET_CLI_TELEMETRY_OPTOUT + value: 1 + - name: POWERSHELL_TELEMETRY_OPTOUT + value: 1 + +resources: + repositories: + - repository: ComplianceRepo + type: github + endpoint: ComplianceGHRepo + name: PowerShell/compliance + +stages: +- stage: Build + displayName: Build + pool: + vmImage: windows-latest + jobs: + - job: Build_Job + displayName: Build PlatyPS + steps: + - checkout: self + clean: true + - pwsh: | + $versionString = if ($env:RELEASE_VERSION -eq 'fromBranch') { + $branch = $env:BUILD_SOURCEBRANCH + $branchOnly = $branch -replace '^refs/heads/' + $branchOnly -replace '^.*(release/v2[-/])' + } + else { + $env:RELEASE_VERSION + } + + $nugetVersion = if ($versionString.StartsWith('v')) { + $versionString.Substring(1) + } + else { + $versionString + } + + $vstsCommandString = "vso[task.setvariable variable=Version]$nugetVersion" + Write-Verbose -Message "setting Version to $releaseTag" -Verbose + Write-Host -Object "##$vstsCommandString" + displayName: Set NuGet package version variable + + - pwsh: | + ./build.ps1 -Clean -Configuration 'Release' + displayName: Execute build + + - publish: '$(Build.SourcesDirectory)\out\platyPS' + artifact: build + displayName: Publish build package + + - template: EsrpSign.yml@ComplianceRepo + parameters: + buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' + signOutputPath: '$(Pipeline.Workspace)\signed' + certificateId: 'CP-230012' + pattern: | + '**\Microsoft.PowerShell.PlatyPS.dll' + '**\platyPS.psd1' + useMinimatch: true + + - template: EsrpSign.yml@ComplianceRepo + parameters: + buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' + signOutputPath: '$(Pipeline.Workspace)\signed' + certificateId: 'CP-231522' + pattern: | + **\Markdig.Signed.dll + **\YamlDotNet.dll + useMinimatch: true + + - pwsh: | + Copy-Item -Path "$env:BUILD_SOURCESDIRECTORY\out\platyPS" -Destination "$env:PIPELINE_WORKSPACE\signed" -recurse -verbose -force + displayName: Dummy copy to signed + condition: eq(variables['SkipSigning'], 'True') + + - publish: '$(Pipeline.Workspace)\signed' + artifact: signed + displayName: Publish signed package + condition: ne(variables['SkipSigning'], 'True') + + - publish: '$(Build.SourcesDirectory)\src\obj\project.assets.json' + artifact: AssetsJson + displayName: Publish project.assets.json + +- stage: compliance + displayName: Compliance + dependsOn: Build + jobs: + - job: Compliance_Job + pool: + name: 1ES + steps: + - checkout: self + - checkout: ComplianceRepo + + - task: DownloadPipelineArtifact@2 + displayName: 'Download AssetsJson artifacts' + inputs: + artifact: AssetsJson + path: '$(Pipeline.Workspace)/AssetsJson' + + - task: DownloadPipelineArtifact@2 + displayName: 'Download build artifacts' + inputs: + artifact: build + path: '$(Pipeline.Workspace)/build' + + - pwsh: | + Get-ChildItem -Recurse '$(Pipeline.Workspace)' + displayName: Capture downloaded artifacts + + - template: assembly-module-compliance.yml@ComplianceRepo + parameters: + # binskim + AnalyzeTarget: '$(Pipeline.Workspace)/build/*.dll' + AnalyzeSymPath: 'SRV*' + # component-governance + sourceScanPath: '$(Pipeline.Workspace)/AssetsJson' + # credscan + suppressionsFile: '' + # TermCheck + optionsRulesDBPath: '' + optionsFTPath: '' + # tsa-upload + codeBaseName: 'PSPager_202007' + # selections + APIScan: false # set to false when not using Windows APIs. + +- template: template/publish.yml + parameters: + stageName: AzArtifactsFeed + environmentName: PSPagerAzFeedApproval + feedCredential: AzArtifactFeedPSPagerPush + +- template: template/publish.yml + parameters: + stageName: NuGet + environmentName: PSPagerNuGetApproval + feedCredential: NugetOrgPush \ No newline at end of file From e579fdd84d0b1c149052865d3298346dc7179d79 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 13:06:29 -0700 Subject: [PATCH 02/12] More fixes --- tools/releaseBuild/release.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index 03fb19a8..82a9017c 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -87,6 +87,11 @@ stages: displayName: Dummy copy to signed condition: eq(variables['SkipSigning'], 'True') + - pwsh: | + $null = New-Item -ItemType Directory -Path '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Force + Copy-Item -Path '$(Pipeline.Workspace)\signed\*' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force + displayName: Copy signed files to module folder + - publish: '$(Pipeline.Workspace)\signed' artifact: signed displayName: Publish signed package @@ -96,6 +101,16 @@ stages: artifact: AssetsJson displayName: Publish project.assets.json + - pwsh: | + $null = New-Item -ItemTypeDirectory -Path '$(System.ArtifactsDirectory)/local' + Register-PSRepository -Name local -SourceLocation '$(System.ArtifactsDirectory)/local' -Verbose -ErrorAction Ignore + Publish-Module -Repository local -Path '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose + displayName: Create nupkg for the module + + - publish: '$(System.ArtifactsDirectory)\local\platyPS$(Version).nupkg' + artifact: nuget + displayName: Publish module nuget + - stage: compliance displayName: Compliance dependsOn: Build @@ -136,18 +151,12 @@ stages: optionsRulesDBPath: '' optionsFTPath: '' # tsa-upload - codeBaseName: 'PSPager_202007' + codeBaseName: 'PlatyPS_202105' # selections APIScan: false # set to false when not using Windows APIs. -- template: template/publish.yml - parameters: - stageName: AzArtifactsFeed - environmentName: PSPagerAzFeedApproval - feedCredential: AzArtifactFeedPSPagerPush - - template: template/publish.yml parameters: stageName: NuGet - environmentName: PSPagerNuGetApproval + environmentName: PlatyPSNuGetApproval feedCredential: NugetOrgPush \ No newline at end of file From f883941f723ee65ab0493c5350dea7744a743c21 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 13:11:00 -0700 Subject: [PATCH 03/12] Add publish template --- tools/releaseBuild/template/publish.yml | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tools/releaseBuild/template/publish.yml diff --git a/tools/releaseBuild/template/publish.yml b/tools/releaseBuild/template/publish.yml new file mode 100644 index 00000000..6d5def16 --- /dev/null +++ b/tools/releaseBuild/template/publish.yml @@ -0,0 +1,43 @@ +parameters: + stageName: '' + environmentName: '' + feedCredential: '' + +stages: +- stage: ${{ parameters.stageName }} + displayName: Release Microsoft.PowerShell.Pager to '${{ parameters.stageName }}' + condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) + + jobs: + - deployment: Publish_${{ parameters.stageName }} + displayName: Release to Feed + pool: + name: 1ES + + environment: ${{ parameters.environmentName }} + strategy: + runOnce: + deploy: + steps: + - download: current + artifact: nuget + + - powershell: | + Get-ChildItem -Recurse "$(Pipeline.Workspace)/nuget" + displayName: Capture downloaded artifact + + - task: NuGetAuthenticate@0 + condition: ne('${{ parameters.feedUrl }}', '') + + - powershell: | + nuget push -ApiKey AzureArtifacts -source '${{ parameters.feedUrl }}' '$(NugetPkgPath)' + displayName: Push to internal feed + condition: ne('${{ parameters.feedUrl }}', '') + - task: NuGetCommand@2 + displayName: 'NuGet push' + inputs: + command: push + packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.PowerShell.Pager.*.nupkg' + nuGetFeedType: external + publishFeedCredentials: ${{ parameters.feedCredential }} + condition: eq('${{ parameters.feedUrl }}', '') \ No newline at end of file From 88a765e2ace0c41e322fb2c22761ad431c63594b Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 13:42:50 -0700 Subject: [PATCH 04/12] Comment out ESRP signing tasks --- tools/releaseBuild/release.yml | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index 82a9017c..dad41ffb 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -62,25 +62,25 @@ stages: artifact: build displayName: Publish build package - - template: EsrpSign.yml@ComplianceRepo - parameters: - buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' - signOutputPath: '$(Pipeline.Workspace)\signed' - certificateId: 'CP-230012' - pattern: | - '**\Microsoft.PowerShell.PlatyPS.dll' - '**\platyPS.psd1' - useMinimatch: true - - - template: EsrpSign.yml@ComplianceRepo - parameters: - buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' - signOutputPath: '$(Pipeline.Workspace)\signed' - certificateId: 'CP-231522' - pattern: | - **\Markdig.Signed.dll - **\YamlDotNet.dll - useMinimatch: true + #- template: EsrpSign.yml@ComplianceRepo + # parameters: + # buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' + # signOutputPath: '$(Pipeline.Workspace)\signed' + # certificateId: 'CP-230012' + # pattern: | + # '**\Microsoft.PowerShell.PlatyPS.dll' + # '**\platyPS.psd1' + # useMinimatch: true + + #- template: EsrpSign.yml@ComplianceRepo + # parameters: + # buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' + # signOutputPath: '$(Pipeline.Workspace)\signed' + # certificateId: 'CP-231522' + # pattern: | + # **\Markdig.Signed.dll + # **\YamlDotNet.dll + # useMinimatch: true - pwsh: | Copy-Item -Path "$env:BUILD_SOURCESDIRECTORY\out\platyPS" -Destination "$env:PIPELINE_WORKSPACE\signed" -recurse -verbose -force @@ -159,4 +159,4 @@ stages: parameters: stageName: NuGet environmentName: PlatyPSNuGetApproval - feedCredential: NugetOrgPush \ No newline at end of file + feedCredential: NugetOrgPush From d404bb09ceaa96dd393b4e1ec1cfcccb0e0288e5 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 14:52:36 -0700 Subject: [PATCH 05/12] Fix typo --- tools/releaseBuild/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index dad41ffb..1af9aada 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -102,7 +102,7 @@ stages: displayName: Publish project.assets.json - pwsh: | - $null = New-Item -ItemTypeDirectory -Path '$(System.ArtifactsDirectory)/local' + $null = New-Item -ItemType Directory -Path '$(System.ArtifactsDirectory)/local' Register-PSRepository -Name local -SourceLocation '$(System.ArtifactsDirectory)/local' -Verbose -ErrorAction Ignore Publish-Module -Repository local -Path '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose displayName: Create nupkg for the module From af2b2e02b8eb70f28b15f95df9838927bf3491c8 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 15:22:43 -0700 Subject: [PATCH 06/12] Fix package name --- tools/releaseBuild/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index 1af9aada..94b7b567 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -107,7 +107,7 @@ stages: Publish-Module -Repository local -Path '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose displayName: Create nupkg for the module - - publish: '$(System.ArtifactsDirectory)\local\platyPS$(Version).nupkg' + - publish: '$(System.ArtifactsDirectory)\local\platyPS.$(Version).nupkg' artifact: nuget displayName: Publish module nuget From 4aec213ea27f5d1598c72c46a21278743bf5b0de Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 15:23:44 -0700 Subject: [PATCH 07/12] Add signing tasks --- tools/releaseBuild/release.yml | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index 94b7b567..c60ad77a 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -62,25 +62,25 @@ stages: artifact: build displayName: Publish build package - #- template: EsrpSign.yml@ComplianceRepo - # parameters: - # buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' - # signOutputPath: '$(Pipeline.Workspace)\signed' - # certificateId: 'CP-230012' - # pattern: | - # '**\Microsoft.PowerShell.PlatyPS.dll' - # '**\platyPS.psd1' - # useMinimatch: true - - #- template: EsrpSign.yml@ComplianceRepo - # parameters: - # buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' - # signOutputPath: '$(Pipeline.Workspace)\signed' - # certificateId: 'CP-231522' - # pattern: | - # **\Markdig.Signed.dll - # **\YamlDotNet.dll - # useMinimatch: true + - template: EsrpSign.yml@ComplianceRepo + parameters: + buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' + signOutputPath: '$(Pipeline.Workspace)\signed' + certificateId: 'CP-230012' + pattern: | + '**\Microsoft.PowerShell.PlatyPS.dll' + '**\platyPS.psd1' + useMinimatch: true + + - template: EsrpSign.yml@ComplianceRepo + parameters: + buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' + signOutputPath: '$(Pipeline.Workspace)\signed' + certificateId: 'CP-231522' + pattern: | + **\Markdig.Signed.dll + **\YamlDotNet.dll + useMinimatch: true - pwsh: | Copy-Item -Path "$env:BUILD_SOURCESDIRECTORY\out\platyPS" -Destination "$env:PIPELINE_WORKSPACE\signed" -recurse -verbose -force From c04439879c866600cb894773d142296db988f57d Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 15:51:34 -0700 Subject: [PATCH 08/12] Fix minimatch pattern --- tools/releaseBuild/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index c60ad77a..d1f42095 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -68,8 +68,8 @@ stages: signOutputPath: '$(Pipeline.Workspace)\signed' certificateId: 'CP-230012' pattern: | - '**\Microsoft.PowerShell.PlatyPS.dll' - '**\platyPS.psd1' + **\Microsoft.PowerShell.PlatyPS.dll + **\platyPS.psd1 useMinimatch: true - template: EsrpSign.yml@ComplianceRepo From 4778a80116b9226edc3deb9c773e664b834a0971 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 17:20:56 -0700 Subject: [PATCH 09/12] Make sure signed files are merge together --- tools/releaseBuild/release.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index d1f42095..e021590d 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -65,7 +65,7 @@ stages: - template: EsrpSign.yml@ComplianceRepo parameters: buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' - signOutputPath: '$(Pipeline.Workspace)\signed' + signOutputPath: '$(Pipeline.Workspace)\signed\codesign' certificateId: 'CP-230012' pattern: | **\Microsoft.PowerShell.PlatyPS.dll @@ -75,7 +75,7 @@ stages: - template: EsrpSign.yml@ComplianceRepo parameters: buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' - signOutputPath: '$(Pipeline.Workspace)\signed' + signOutputPath: '$(Pipeline.Workspace)\signed\thirdparty' certificateId: 'CP-231522' pattern: | **\Markdig.Signed.dll @@ -89,7 +89,16 @@ stages: - pwsh: | $null = New-Item -ItemType Directory -Path '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Force - Copy-Item -Path '$(Pipeline.Workspace)\signed\*' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force + + if ( Test-Path -Path '$(Pipeline.Workspace)\signed\codesign') + { + Copy-Item -Path '$(Pipeline.Workspace)\signed\codesign\*' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force + Copy-Item -Path '$(Pipeline.Workspace)\signed\thirdparty\*' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force + } + else + { + Copy-Item -Path '$(Pipeline.Workspace)\signed\*' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force + } displayName: Copy signed files to module folder - publish: '$(Pipeline.Workspace)\signed' From 0af33eb729a691b5c1d01a3ee4f85491102249e4 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Thu, 13 May 2021 22:01:50 -0700 Subject: [PATCH 10/12] Make sure all signed files are added to the package --- tools/releaseBuild/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index e021590d..ed1d3aba 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -92,8 +92,10 @@ stages: if ( Test-Path -Path '$(Pipeline.Workspace)\signed\codesign') { - Copy-Item -Path '$(Pipeline.Workspace)\signed\codesign\*' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force - Copy-Item -Path '$(Pipeline.Workspace)\signed\thirdparty\*' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force + Copy-Item -Path '$(Pipeline.Workspace)\signed\codesign\Microsoft.PowerShell.PlatyPS.dll' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force + Copy-Item -Path '$(Pipeline.Workspace)\signed\codesign\platyPS.psd1' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force + Copy-Item -Path '$(Pipeline.Workspace)\signed\thirdparty\Markdig.Signed.dll' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force + Copy-Item -Path '$(Pipeline.Workspace)\signed\thirdparty\YamlDotNet.dll' -Destination '$(System.ArtifactsDirectory)/signedpackage/platyPS' -Verbose -Force } else { From 7cbd350a18ce3da16517dcfc57a97fd9d8b74cd5 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 17 May 2021 11:09:15 -0700 Subject: [PATCH 11/12] Address CR comments --- tools/releaseBuild/release.yml | 2 ++ tools/releaseBuild/template/publish.yml | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index ed1d3aba..98981c13 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -67,6 +67,7 @@ stages: buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' signOutputPath: '$(Pipeline.Workspace)\signed\codesign' certificateId: 'CP-230012' + displayName: Microsoft signing pattern: | **\Microsoft.PowerShell.PlatyPS.dll **\platyPS.psd1 @@ -77,6 +78,7 @@ stages: buildOutputPath: '$(Build.SourcesDirectory)\out\platyPS' signOutputPath: '$(Pipeline.Workspace)\signed\thirdparty' certificateId: 'CP-231522' + displayName: Third party signing pattern: | **\Markdig.Signed.dll **\YamlDotNet.dll diff --git a/tools/releaseBuild/template/publish.yml b/tools/releaseBuild/template/publish.yml index 6d5def16..6f54a1ef 100644 --- a/tools/releaseBuild/template/publish.yml +++ b/tools/releaseBuild/template/publish.yml @@ -22,14 +22,14 @@ stages: - download: current artifact: nuget - - powershell: | + - pwsh: | Get-ChildItem -Recurse "$(Pipeline.Workspace)/nuget" displayName: Capture downloaded artifact - task: NuGetAuthenticate@0 condition: ne('${{ parameters.feedUrl }}', '') - - powershell: | + - pwsh: | nuget push -ApiKey AzureArtifacts -source '${{ parameters.feedUrl }}' '$(NugetPkgPath)' displayName: Push to internal feed condition: ne('${{ parameters.feedUrl }}', '') @@ -40,4 +40,4 @@ stages: packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.PowerShell.Pager.*.nupkg' nuGetFeedType: external publishFeedCredentials: ${{ parameters.feedCredential }} - condition: eq('${{ parameters.feedUrl }}', '') \ No newline at end of file + condition: eq('${{ parameters.feedUrl }}', '') From ba2c637d0529d64755e15d79d1aa681fcd4b90b4 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 17 May 2021 11:57:21 -0700 Subject: [PATCH 12/12] Fix pool names and ImageOverride conditions --- tools/releaseBuild/release.yml | 6 +++++- tools/releaseBuild/template/publish.yml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/releaseBuild/release.yml b/tools/releaseBuild/release.yml index 98981c13..9123a554 100644 --- a/tools/releaseBuild/release.yml +++ b/tools/releaseBuild/release.yml @@ -25,7 +25,9 @@ stages: - stage: Build displayName: Build pool: - vmImage: windows-latest + name: 1ES + demands: + - ImageOverride -equals MMS2019 jobs: - job: Build_Job displayName: Build PlatyPS @@ -131,6 +133,8 @@ stages: - job: Compliance_Job pool: name: 1ES + demands: + - ImageOverride -equals MMS2019 steps: - checkout: self - checkout: ComplianceRepo diff --git a/tools/releaseBuild/template/publish.yml b/tools/releaseBuild/template/publish.yml index 6f54a1ef..70d91012 100644 --- a/tools/releaseBuild/template/publish.yml +++ b/tools/releaseBuild/template/publish.yml @@ -6,7 +6,7 @@ parameters: stages: - stage: ${{ parameters.stageName }} displayName: Release Microsoft.PowerShell.Pager to '${{ parameters.stageName }}' - condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) + condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/v2')) jobs: - deployment: Publish_${{ parameters.stageName }}