From 92df6c4e8a299cfcb72716dc7d12e8e5c6a0d4a4 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 25 Apr 2020 23:32:16 +0100 Subject: [PATCH 01/13] Pass pwsh parameter explicitly as runtime parameter --- .azure-pipelines-ci/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 71ec55030..a61b99be5 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -47,3 +47,5 @@ stages: vmImage: $[ variables['vmImage'] ] steps: - template: templates/test.yaml + parameters: + - pwsh: $[ variables['pwsh'] ] From f270590b54b98c070aeb617a1f6c6c9e25fea4fd Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 25 Apr 2020 23:33:25 +0100 Subject: [PATCH 02/13] fix yaml --- .azure-pipelines-ci/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index a61b99be5..549ce54a5 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -48,4 +48,4 @@ stages: steps: - template: templates/test.yaml parameters: - - pwsh: $[ variables['pwsh'] ] + pwsh: $[ variables['pwsh'] ] From f60a15477a2981b0b09638330b9af628bb3c9f6d Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 25 Apr 2020 23:41:59 +0100 Subject: [PATCH 03/13] try use compile time expression --- .azure-pipelines-ci/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 549ce54a5..0587fba94 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -48,4 +48,4 @@ stages: steps: - template: templates/test.yaml parameters: - pwsh: $[ variables['pwsh'] ] + pwsh: ${{ variables['pwsh'] }} From 637b3bc852e5dd59297e912f9bed7b44b8d9fd00 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 25 Apr 2020 23:43:56 +0100 Subject: [PATCH 04/13] cannot cast to bool, use string --- .azure-pipelines-ci/templates/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines-ci/templates/test.yaml b/.azure-pipelines-ci/templates/test.yaml index 55cea8a41..fb6cdf1fb 100644 --- a/.azure-pipelines-ci/templates/test.yaml +++ b/.azure-pipelines-ci/templates/test.yaml @@ -1,7 +1,7 @@ parameters: - name: pwsh - type: boolean - default: true + type: string + default: 'true' steps: - task: DownloadPipelineArtifact@2 From 517ba15f925bce79a48ef604ec090d78f5e15763 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 25 Apr 2020 23:45:06 +0100 Subject: [PATCH 05/13] compile time expressions everywhere --- .azure-pipelines-ci/ci.yaml | 2 +- .azure-pipelines-ci/templates/test.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 0587fba94..55d29308b 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -44,7 +44,7 @@ stages: vmImage: windows-2019 pwsh: false pool: - vmImage: $[ variables['vmImage'] ] + vmImage: ${{ variables['vmImage'] }} steps: - template: templates/test.yaml parameters: diff --git a/.azure-pipelines-ci/templates/test.yaml b/.azure-pipelines-ci/templates/test.yaml index fb6cdf1fb..2773e1c91 100644 --- a/.azure-pipelines-ci/templates/test.yaml +++ b/.azure-pipelines-ci/templates/test.yaml @@ -13,7 +13,7 @@ steps: displayName: 'Test' inputs: targetType: inline - pwsh: $[ parameters.pwsh ] + pwsh: ${{ parameters.pwsh }} script: | Import-Module .\tools\appveyor.psm1 Invoke-AppveyorTest -CheckoutPath $env:BUILD_SOURCESDIRECTORY From ca765156eaf5ed9eb3dd786557e579e354b4bf29 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 26 Apr 2020 00:30:53 +0100 Subject: [PATCH 06/13] Revert "compile time expressions everywhere" This reverts commit 517ba15f925bce79a48ef604ec090d78f5e15763. --- .azure-pipelines-ci/ci.yaml | 2 +- .azure-pipelines-ci/templates/test.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 55d29308b..0587fba94 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -44,7 +44,7 @@ stages: vmImage: windows-2019 pwsh: false pool: - vmImage: ${{ variables['vmImage'] }} + vmImage: $[ variables['vmImage'] ] steps: - template: templates/test.yaml parameters: diff --git a/.azure-pipelines-ci/templates/test.yaml b/.azure-pipelines-ci/templates/test.yaml index 2773e1c91..fb6cdf1fb 100644 --- a/.azure-pipelines-ci/templates/test.yaml +++ b/.azure-pipelines-ci/templates/test.yaml @@ -13,7 +13,7 @@ steps: displayName: 'Test' inputs: targetType: inline - pwsh: ${{ parameters.pwsh }} + pwsh: $[ parameters.pwsh ] script: | Import-Module .\tools\appveyor.psm1 Invoke-AppveyorTest -CheckoutPath $env:BUILD_SOURCESDIRECTORY From 3af2262fcafef722f4f0b2cb480cf041321251dd Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 26 Apr 2020 00:32:04 +0100 Subject: [PATCH 07/13] runtime expr --- .azure-pipelines-ci/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 0587fba94..549ce54a5 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -48,4 +48,4 @@ stages: steps: - template: templates/test.yaml parameters: - pwsh: ${{ variables['pwsh'] }} + pwsh: $[ variables['pwsh'] ] From 01a7d39e68a50a417fdd8bfbbd191f3f85839ca3 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 27 Apr 2020 21:49:20 +0100 Subject: [PATCH 08/13] try use $() expression and don't pass parameter --- .azure-pipelines-ci/ci.yaml | 2 -- .azure-pipelines-ci/templates/test.yaml | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 549ce54a5..71ec55030 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -47,5 +47,3 @@ stages: vmImage: $[ variables['vmImage'] ] steps: - template: templates/test.yaml - parameters: - pwsh: $[ variables['pwsh'] ] diff --git a/.azure-pipelines-ci/templates/test.yaml b/.azure-pipelines-ci/templates/test.yaml index fb6cdf1fb..e18875bdc 100644 --- a/.azure-pipelines-ci/templates/test.yaml +++ b/.azure-pipelines-ci/templates/test.yaml @@ -1,8 +1,3 @@ -parameters: -- name: pwsh - type: string - default: 'true' - steps: - task: DownloadPipelineArtifact@2 displayName: 'Download Pipeline Artifact: out Folder' @@ -13,7 +8,7 @@ steps: displayName: 'Test' inputs: targetType: inline - pwsh: $[ parameters.pwsh ] + pwsh: $(pwsh) script: | Import-Module .\tools\appveyor.psm1 Invoke-AppveyorTest -CheckoutPath $env:BUILD_SOURCESDIRECTORY From 8eed77dc14cd7a0254b93249c9ac413c4526ef75 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 27 Apr 2020 22:11:14 +0100 Subject: [PATCH 09/13] try re-add param section --- .azure-pipelines-ci/templates/test.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.azure-pipelines-ci/templates/test.yaml b/.azure-pipelines-ci/templates/test.yaml index e18875bdc..84e448f48 100644 --- a/.azure-pipelines-ci/templates/test.yaml +++ b/.azure-pipelines-ci/templates/test.yaml @@ -1,3 +1,8 @@ +parameters: +- name: pwsh + type: string + default: 'true' + steps: - task: DownloadPipelineArtifact@2 displayName: 'Download Pipeline Artifact: out Folder' From 66cb8abebe3512ffcdd533d39e0f0a2601a9ef5d Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 27 Apr 2020 22:25:33 +0100 Subject: [PATCH 10/13] try use bracket again --- .azure-pipelines-ci/ci.yaml | 9 +++++---- .azure-pipelines-ci/templates/test.yaml | 7 +------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 71ec55030..f4eddf41f 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -10,10 +10,11 @@ stages: vmImage: windows-latest steps: - pwsh: | - Import-Module .\tools\appveyor.psm1 - Invoke-AppveyorInstall -SkipPesterInstallation - ./build.ps1 -Configuration 'Release' -All - ./PSCompatibilityCollector/build.ps1 -Configuration 'Release' + mkdir out + #Import-Module .\tools\appveyor.psm1 + #Invoke-AppveyorInstall -SkipPesterInstallation + #./build.ps1 -Configuration 'Release' -All + #./PSCompatibilityCollector/build.ps1 -Configuration 'Release' displayName: 'Full Build' - task: PublishPipelineArtifact@1 displayName: 'Publish Pipeline Artifact: out Folder' diff --git a/.azure-pipelines-ci/templates/test.yaml b/.azure-pipelines-ci/templates/test.yaml index 84e448f48..99e8d331f 100644 --- a/.azure-pipelines-ci/templates/test.yaml +++ b/.azure-pipelines-ci/templates/test.yaml @@ -1,8 +1,3 @@ -parameters: -- name: pwsh - type: string - default: 'true' - steps: - task: DownloadPipelineArtifact@2 displayName: 'Download Pipeline Artifact: out Folder' @@ -13,7 +8,7 @@ steps: displayName: 'Test' inputs: targetType: inline - pwsh: $(pwsh) + pwsh: $[ variables['pwsh'] ] script: | Import-Module .\tools\appveyor.psm1 Invoke-AppveyorTest -CheckoutPath $env:BUILD_SOURCESDIRECTORY From fc361a366ad498c8deb42f6f6db89cd5352cfb34 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 27 Apr 2020 22:37:03 +0100 Subject: [PATCH 11/13] try split test template # Conflicts: # .azure-pipelines-ci/templates/test-powershell.yaml --- .azure-pipelines-ci/ci.yaml | 11 ++++++++++- .../{test.yaml => test-powershell.yaml} | 2 +- .azure-pipelines-ci/templates/test-pwsh.yaml | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) rename .azure-pipelines-ci/templates/{test.yaml => test-powershell.yaml} (93%) create mode 100644 .azure-pipelines-ci/templates/test-pwsh.yaml diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index f4eddf41f..da495f7a8 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -38,6 +38,15 @@ stages: vmImage: vs2017-win2016 Windows_Server2019_PowerShell_Core: vmImage: windows-2019 + pool: + vmImage: $[ variables['vmImage'] ] + steps: + - template: templates/test-pwsh.yaml + - job: + strategy: + matrix: + Windows_Server2019_PowerShell_Core: + vmImage: windows-2019 Windows_Server2016_PowerShell_5_1: vmImage: vs2017-win2016 pwsh: false @@ -47,4 +56,4 @@ stages: pool: vmImage: $[ variables['vmImage'] ] steps: - - template: templates/test.yaml + - template: templates/test-powershell.yaml diff --git a/.azure-pipelines-ci/templates/test.yaml b/.azure-pipelines-ci/templates/test-powershell.yaml similarity index 93% rename from .azure-pipelines-ci/templates/test.yaml rename to .azure-pipelines-ci/templates/test-powershell.yaml index 99e8d331f..e832f04e4 100644 --- a/.azure-pipelines-ci/templates/test.yaml +++ b/.azure-pipelines-ci/templates/test-powershell.yaml @@ -8,7 +8,7 @@ steps: displayName: 'Test' inputs: targetType: inline - pwsh: $[ variables['pwsh'] ] + pwsh: false script: | Import-Module .\tools\appveyor.psm1 Invoke-AppveyorTest -CheckoutPath $env:BUILD_SOURCESDIRECTORY diff --git a/.azure-pipelines-ci/templates/test-pwsh.yaml b/.azure-pipelines-ci/templates/test-pwsh.yaml new file mode 100644 index 000000000..2661b2157 --- /dev/null +++ b/.azure-pipelines-ci/templates/test-pwsh.yaml @@ -0,0 +1,19 @@ +steps: +- task: DownloadPipelineArtifact@2 + displayName: 'Download Pipeline Artifact: out Folder' + inputs: + artifactName: out + targetPath: '$(Build.SourcesDirectory)/out' +- task: PowerShell@2 + displayName: 'Test' + inputs: + targetType: inline + pwsh: true + script: | + Import-Module .\tools\appveyor.psm1 + Invoke-AppveyorTest -CheckoutPath $env:BUILD_SOURCESDIRECTORY +- task: PublishTestResults@2 + inputs: + testRunner: NUnit + testResultsFiles: 'TestResults.xml' + condition: succeededOrFailed() From 90ad29362eabf1552f39d47bb5f9bc083c5aab72 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 27 Apr 2020 22:54:10 +0100 Subject: [PATCH 12/13] re-enable build --- .azure-pipelines-ci/ci.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 5f006b793..665ad345e 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -10,11 +10,10 @@ stages: vmImage: windows-latest steps: - pwsh: | - mkdir out - #Import-Module .\tools\appveyor.psm1 - #Invoke-AppveyorInstall -SkipPesterInstallation - #./build.ps1 -Configuration 'Release' -All - #./PSCompatibilityCollector/build.ps1 -Configuration 'Release' + Import-Module .\tools\appveyor.psm1 + Invoke-AppveyorInstall -SkipPesterInstallation + ./build.ps1 -Configuration 'Release' -All + ./PSCompatibilityCollector/build.ps1 -Configuration 'Release' displayName: 'Full Build' - pwsh: | Write-Host "##vso[artifact.upload containerfolder=out;artifactname=out;]${env:Build_SourcesDirectory}/out" From 765748da1b233e89f597c2afe34349d07cc05a91 Mon Sep 17 00:00:00 2001 From: "Christoph Bergmeister [MVP]" Date: Tue, 28 Apr 2020 22:40:04 +0100 Subject: [PATCH 13/13] remove duplicated entry --- .azure-pipelines-ci/ci.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.azure-pipelines-ci/ci.yaml b/.azure-pipelines-ci/ci.yaml index 665ad345e..7cf89937a 100644 --- a/.azure-pipelines-ci/ci.yaml +++ b/.azure-pipelines-ci/ci.yaml @@ -41,8 +41,6 @@ stages: - job: strategy: matrix: - Windows_Server2019_PowerShell_Core: - vmImage: windows-2019 Windows_Server2016_PowerShell_5_1: vmImage: vs2017-win2016 pwsh: false