From e34ceaf84f4ee8d13074fb893ca98fa6c860aa66 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 16:18:22 -0800 Subject: [PATCH 01/12] Enable CI in Azure Pipeline --- .vsts-ci/ci.yml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .vsts-ci/ci.yml diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml new file mode 100644 index 000000000..02ed163e5 --- /dev/null +++ b/.vsts-ci/ci.yml @@ -0,0 +1,58 @@ +name: PSReadLine-$(Date:yyyyMMdd).$(Rev:.rr) +trigger: + # Batch merge builds together while a merge build is running + batch: true + branches: + include: + - master + - ci +pr: + branches: + include: + - master + - ci + +variables: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + POWERSHELL_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + PSREADLINE_TESTRUN: 1 + +resources: + repositories: + - repository: ComplianceRepo + type: github + endpoint: ComplianceGHRepo + name: PowerShell/compliance + +stages: +- stage: Build + displayName: Build PSReadLine module + jobs: + - job: BuildPkg + displayName: Build Package + pool: + vmImage: windows-latest + steps: + - pwsh: | + Write-Host "PS Version: $($PSVersionTable.PSVersion)" + Set-Location -Path '$(Build.SourcesDirectory)\PSReadLine' + .\build.ps1 -Bootstrap + .\build.ps1 -Configuration Release -Framework net462 + + $output = '$(Build.SourcesDirectory)\PSReadLine\bin\Release\PSReadLine' + Write-Host "##vso[artifact.upload containerfolder=PSReadLine;artifactname=PSReadLine]$output" + displayName: Bootstrap & Build + +- stage: Test + displayName: Test Package + dependsOn: Build + jobs: + - job: TestPkg + displayName: Test Package + pool: + vmImage: windows-latest + steps: + - pwsh: | + Set-Location -Path '$(Build.SourcesDirectory)\PSReadLine' + .\build.ps1 -Test -Configuration Release -Framework net462 From 6f8a8c804407eda284bb7d037212d6b9b1f106ea Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 16:26:10 -0800 Subject: [PATCH 02/12] Remove compliance from CI --- .vsts-ci/ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index 02ed163e5..7d8392f4d 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -18,13 +18,6 @@ variables: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 PSREADLINE_TESTRUN: 1 -resources: - repositories: - - repository: ComplianceRepo - type: github - endpoint: ComplianceGHRepo - name: PowerShell/compliance - stages: - stage: Build displayName: Build PSReadLine module From cd0b6816225190918abbcf84f75bc4d9014a690d Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 16:33:31 -0800 Subject: [PATCH 03/12] Checkout the repo --- .vsts-ci/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index 7d8392f4d..8741e2bff 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -26,7 +26,12 @@ stages: displayName: Build Package pool: vmImage: windows-latest + steps: + - checkout: self + clean: true + persistCredentials: true + - pwsh: | Write-Host "PS Version: $($PSVersionTable.PSVersion)" Set-Location -Path '$(Build.SourcesDirectory)\PSReadLine' @@ -45,7 +50,9 @@ stages: displayName: Test Package pool: vmImage: windows-latest + steps: + - pwsh: | Set-Location -Path '$(Build.SourcesDirectory)\PSReadLine' .\build.ps1 -Test -Configuration Release -Framework net462 From 5c99b0e32e19ccd7617b2e67bcaaf873a8dcaf33 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 16:39:25 -0800 Subject: [PATCH 04/12] dir --- .vsts-ci/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index 8741e2bff..04de969e1 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -35,6 +35,7 @@ stages: - pwsh: | Write-Host "PS Version: $($PSVersionTable.PSVersion)" Set-Location -Path '$(Build.SourcesDirectory)\PSReadLine' + Get-ChildItem .\build.ps1 -Bootstrap .\build.ps1 -Configuration Release -Framework net462 From 9c606297e68221e4483f82c510ad5c2747bbbe44 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 16:41:45 -0800 Subject: [PATCH 05/12] wrong path? --- .vsts-ci/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index 04de969e1..ea0a85861 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -28,13 +28,10 @@ stages: vmImage: windows-latest steps: - - checkout: self - clean: true - persistCredentials: true - pwsh: | Write-Host "PS Version: $($PSVersionTable.PSVersion)" - Set-Location -Path '$(Build.SourcesDirectory)\PSReadLine' + Set-Location -Path '$(Build.SourcesDirectory)' Get-ChildItem .\build.ps1 -Bootstrap .\build.ps1 -Configuration Release -Framework net462 From a54654b91196b5693760d04554b5b81bbe9d2553 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 16:47:31 -0800 Subject: [PATCH 06/12] wrong artifact path --- .vsts-ci/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index ea0a85861..f176ba0b6 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -36,7 +36,7 @@ stages: .\build.ps1 -Bootstrap .\build.ps1 -Configuration Release -Framework net462 - $output = '$(Build.SourcesDirectory)\PSReadLine\bin\Release\PSReadLine' + $output = '$(Build.SourcesDirectory)\bin\Release\PSReadLine' Write-Host "##vso[artifact.upload containerfolder=PSReadLine;artifactname=PSReadLine]$output" displayName: Bootstrap & Build From e02705fac302c7abf5411eea3c5eea24c2142687 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 16:55:33 -0800 Subject: [PATCH 07/12] Fix another path and remove dir --- .vsts-ci/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index f176ba0b6..958465a3c 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -32,7 +32,6 @@ stages: - pwsh: | Write-Host "PS Version: $($PSVersionTable.PSVersion)" Set-Location -Path '$(Build.SourcesDirectory)' - Get-ChildItem .\build.ps1 -Bootstrap .\build.ps1 -Configuration Release -Framework net462 @@ -52,5 +51,5 @@ stages: steps: - pwsh: | - Set-Location -Path '$(Build.SourcesDirectory)\PSReadLine' + Set-Location -Path '$(Build.SourcesDirectory)' .\build.ps1 -Test -Configuration Release -Framework net462 From c55ca2340dff50da7e64f4ac066e0f221b40f103 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 17:10:20 -0800 Subject: [PATCH 08/12] Some changes again --- .vsts-ci/ci.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index 958465a3c..661ae5b60 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -19,11 +19,9 @@ variables: PSREADLINE_TESTRUN: 1 stages: -- stage: Build - displayName: Build PSReadLine module +- stage: PSReadLine jobs: - - job: BuildPkg - displayName: Build Package + - job: Build & Test pool: vmImage: windows-latest @@ -39,17 +37,7 @@ stages: Write-Host "##vso[artifact.upload containerfolder=PSReadLine;artifactname=PSReadLine]$output" displayName: Bootstrap & Build -- stage: Test - displayName: Test Package - dependsOn: Build - jobs: - - job: TestPkg - displayName: Test Package - pool: - vmImage: windows-latest - - steps: - - pwsh: | Set-Location -Path '$(Build.SourcesDirectory)' .\build.ps1 -Test -Configuration Release -Framework net462 + displayName: Test From 0ea9abb84ebb90926f95360315ec27cc0a7d7a8d Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 17:12:21 -0800 Subject: [PATCH 09/12] update name --- .vsts-ci/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index 661ae5b60..a1ed5d97e 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -21,7 +21,7 @@ variables: stages: - stage: PSReadLine jobs: - - job: Build & Test + - job: Build-Test pool: vmImage: windows-latest From 16d87bbfe57936f56478058e1167c1ae7e5315f6 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 17:13:07 -0800 Subject: [PATCH 10/12] update name --- .vsts-ci/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index a1ed5d97e..7baa4b713 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -21,7 +21,7 @@ variables: stages: - stage: PSReadLine jobs: - - job: Build-Test + - job: Build_Test pool: vmImage: windows-latest From c748e144a40c32bdae976ca5a09faf3acf728947 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 17:22:00 -0800 Subject: [PATCH 11/12] Update name again --- .vsts-ci/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index 7baa4b713..2aa08cf5b 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -40,4 +40,4 @@ stages: - pwsh: | Set-Location -Path '$(Build.SourcesDirectory)' .\build.ps1 -Test -Configuration Release -Framework net462 - displayName: Test + displayName: Run Tests From b2e32b4a883ecd2fc556f9731eb60b90341cf604 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 23 Feb 2023 17:25:14 -0800 Subject: [PATCH 12/12] Disable CI on master at the time being --- .vsts-ci/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.vsts-ci/ci.yml b/.vsts-ci/ci.yml index 2aa08cf5b..7981d3022 100644 --- a/.vsts-ci/ci.yml +++ b/.vsts-ci/ci.yml @@ -4,12 +4,10 @@ trigger: batch: true branches: include: - - master - ci pr: branches: include: - - master - ci variables: