From 245aa8e843307f2eb75f76e0efd3b8ec259f6bc2 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Tue, 14 Sep 2021 15:55:17 -0700 Subject: [PATCH 1/5] Update release build --- .vsts-ci/releaseBuild.yml | 14 ++++++++------ MockPSConsole/MockPSConsole.csproj | 2 +- PSReadLine/PSReadLine.csproj | 2 +- Polyfill/Polyfill.csproj | 2 +- test/PSReadLine.Tests.csproj | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.vsts-ci/releaseBuild.yml b/.vsts-ci/releaseBuild.yml index 225796fab..33cd6b215 100644 --- a/.vsts-ci/releaseBuild.yml +++ b/.vsts-ci/releaseBuild.yml @@ -1,8 +1,6 @@ name: PSReadLine-ModuleBuild-$(Build.BuildId) -trigger: - branches: - include: - - master +trigger: none +pr: none variables: DOTNET_CLI_TELEMETRY_OPTOUT: 1 @@ -20,7 +18,9 @@ stages: - stage: Build displayName: Build and Sign pool: - name: Package ES CodeHub Lab E + name: 1ES + demands: + - ImageOverride -equals MMS2019 jobs: - job: build_windows displayName: Build PSReadLine @@ -127,7 +127,9 @@ stages: displayName: Compliance dependsOn: Build pool: - name: Package ES CodeHub Lab E + name: 1ES + demands: + - ImageOverride -equals MMS2019 jobs: - job: Compliance_Job displayName: PSReadLine Compliance diff --git a/MockPSConsole/MockPSConsole.csproj b/MockPSConsole/MockPSConsole.csproj index 6f57f1342..ad6fdfc15 100644 --- a/MockPSConsole/MockPSConsole.csproj +++ b/MockPSConsole/MockPSConsole.csproj @@ -18,7 +18,7 @@ - + diff --git a/PSReadLine/PSReadLine.csproj b/PSReadLine/PSReadLine.csproj index b1687c5c3..154787bf8 100644 --- a/PSReadLine/PSReadLine.csproj +++ b/PSReadLine/PSReadLine.csproj @@ -22,7 +22,7 @@ - + diff --git a/Polyfill/Polyfill.csproj b/Polyfill/Polyfill.csproj index c8334056e..6093b4e0a 100644 --- a/Polyfill/Polyfill.csproj +++ b/Polyfill/Polyfill.csproj @@ -12,7 +12,7 @@ - + diff --git a/test/PSReadLine.Tests.csproj b/test/PSReadLine.Tests.csproj index f6de2e71f..e4dce6440 100644 --- a/test/PSReadLine.Tests.csproj +++ b/test/PSReadLine.Tests.csproj @@ -24,7 +24,7 @@ - + From 592b156b2485883ff068296a412c70e2b6f8e279 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Tue, 14 Sep 2021 15:57:06 -0700 Subject: [PATCH 2/5] Disable -CheckHelpContent switch for testing --- .vsts-ci/releaseBuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci/releaseBuild.yml b/.vsts-ci/releaseBuild.yml index 33cd6b215..480c897be 100644 --- a/.vsts-ci/releaseBuild.yml +++ b/.vsts-ci/releaseBuild.yml @@ -41,7 +41,7 @@ stages: Write-Host "PS Version: $($($PSVersionTable.PSVersion))" Set-Location -Path '$(Build.SourcesDirectory)\PSReadLine' .\build.ps1 -Bootstrap - .\build.ps1 -Configuration Release -Framework net461 -CheckHelpContent + .\build.ps1 -Configuration Release -Framework net461 # Set target folder paths New-Item -Path .\bin\Release\NuGetPackage -ItemType Directory > $null From 8d79585e020a9e24c1b3efb4605e80fbeb6c80aa Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Tue, 14 Sep 2021 16:12:34 -0700 Subject: [PATCH 3/5] Correct the pool name --- .vsts-ci/releaseBuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vsts-ci/releaseBuild.yml b/.vsts-ci/releaseBuild.yml index 480c897be..653ac4c04 100644 --- a/.vsts-ci/releaseBuild.yml +++ b/.vsts-ci/releaseBuild.yml @@ -18,7 +18,7 @@ stages: - stage: Build displayName: Build and Sign pool: - name: 1ES + name: PowerShell1ES demands: - ImageOverride -equals MMS2019 jobs: @@ -127,7 +127,7 @@ stages: displayName: Compliance dependsOn: Build pool: - name: 1ES + name: PowerShell1ES demands: - ImageOverride -equals MMS2019 jobs: From c1b1946a2b4107aefe557c1c2b325cca866519f3 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 15 Sep 2021 10:11:17 -0700 Subject: [PATCH 4/5] Pass in connection string to APIScan task --- .vsts-ci/releaseBuild.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.vsts-ci/releaseBuild.yml b/.vsts-ci/releaseBuild.yml index 653ac4c04..420992ae2 100644 --- a/.vsts-ci/releaseBuild.yml +++ b/.vsts-ci/releaseBuild.yml @@ -133,6 +133,8 @@ stages: jobs: - job: Compliance_Job displayName: PSReadLine Compliance + variables: + - group: APIScan # APIScan can take a long time timeoutInMinutes: 240 @@ -178,3 +180,4 @@ stages: softwareFolder: '$(Pipeline.Workspace)\PSReadLine' softwareName: 'PSReadLine' softwareVersion: '$(ModuleVersion)' + connectionString: 'RunAs=App;AppId=$(APIScanClient);TenantId=$(APIScanTenant);AppKey=$(APIScanSecret)' From 0b1b225611c73616099e6c345e11032fbc274ac1 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 15 Sep 2021 15:50:08 -0700 Subject: [PATCH 5/5] Re-enable the help content check --- .vsts-ci/releaseBuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci/releaseBuild.yml b/.vsts-ci/releaseBuild.yml index 420992ae2..a3b794b63 100644 --- a/.vsts-ci/releaseBuild.yml +++ b/.vsts-ci/releaseBuild.yml @@ -41,7 +41,7 @@ stages: Write-Host "PS Version: $($($PSVersionTable.PSVersion))" Set-Location -Path '$(Build.SourcesDirectory)\PSReadLine' .\build.ps1 -Bootstrap - .\build.ps1 -Configuration Release -Framework net461 + .\build.ps1 -Configuration Release -Framework net461 -CheckHelpContent # Set target folder paths New-Item -Path .\bin\Release\NuGetPackage -ItemType Directory > $null