Skip to content

Commit d74fe49

Browse files
committed
Fix release build pipeline
A backlog task of removing the `findPsesBuild` script and associated logic caused us to end up with a release with the wrong artifacts. The tagged PSES build was partially succeeded, which the download task then ignored as the trigger, and instead of failing, fell back to this script which gave it the latest fully succeeded build (an old version of PSES). That PSES build was only partially successful because the "Install PowerShell Daily" step failed due to a transient network error, and so this was intentionally ignored as it did not affect the build. Or so we thought.
1 parent 8d207e6 commit d74fe49

File tree

7 files changed

+21
-120
lines changed

7 files changed

+21
-120
lines changed

.vsts-ci/azure-pipelines-ci.yml

-18
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,6 @@ trigger:
1313
branches:
1414
include:
1515
- master
16-
- legacy/1.x
17-
paths:
18-
exclude:
19-
- /.dependabot/*
20-
- /.poshchan/*
21-
- /.github/**/*
22-
- /.vscode/**/*
23-
- /.vsts-ci/misc-analysis.yml
24-
- /tools/**/*
25-
- .editorconfig
26-
- .gitattributes
27-
- .gitignore
28-
- /docs/**/*
29-
- /CHANGELOG.md
30-
- /CONTRIBUTING.md
31-
- /README.md
32-
- /LICENSE
33-
- /CODE_OF_CONDUCT.md
3416

3517
jobs:
3618
- job: Windows

.vsts-ci/azure-pipelines-release.yml

+5-27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
2-
31
variables:
42
# Don't download unneeded packages
53
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
@@ -9,28 +7,9 @@ variables:
97
value: 'true'
108

119
trigger:
12-
batch: true
1310
branches:
1411
include:
15-
- master
16-
- legacy/1.x
17-
paths:
18-
exclude:
19-
- /.dependabot/*
20-
- /.poshchan/*
21-
- /.github/**/*
22-
- /.vscode/**/*
23-
- /.vsts-ci/misc-analysis.yml
24-
- /tools/**/*
25-
- .editorconfig
26-
- .gitattributes
27-
- .gitignore
28-
- /docs/**/*
29-
- /CHANGELOG.md
30-
- /CONTRIBUTING.md
31-
- /README.md
32-
- /LICENSE
33-
- /CODE_OF_CONDUCT.md
12+
- release/*
3413

3514
resources:
3615
repositories:
@@ -43,13 +22,12 @@ resources:
4322
source: PowerShellEditorServices
4423
trigger:
4524
branches:
46-
- master
47-
- releases/*
48-
- changelog*
49-
- refs/tags/*
25+
include:
26+
- release/*
27+
tags:
28+
- v*
5029

5130
jobs:
52-
5331
- job: 'ReleaseBuild'
5432
displayName: 'Build release'
5533
pool:

.vsts-ci/templates/ci-general.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,35 @@ steps:
1313
Write-Host "##vso[task.prependpath]$powerShellPath"
1414
continueOnError: true
1515
displayName: Install PowerShell Daily
16+
1617
- pwsh: '$PSVersionTable'
1718
displayName: Display PowerShell version information
19+
1820
- pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
1921
displayName: Set Build Name for Non-PR
2022
condition: ne(variables['Build.Reason'], 'PullRequest')
21-
- task: PowerShell@2
22-
displayName: 'Set environment variables for VSTS (Phase 1)'
23-
inputs:
24-
targetType: filePath
25-
filePath: ./tools/releaseBuild/setVstsVariables.ps1
23+
24+
# TODO: Use a submodule or some such so we can actually track a version here.
2625
- pwsh: |
27-
Write-Host "Cloning '$env:PSES_BRANCH' branch from '$env:PSES_FORK/PowerShellEditorServices'"
28-
git clone --single-branch --branch $env:PSES_BRANCH https://github.com/$env:PSES_FORK/PowerShellEditorServices.git ../PowerShellEditorServices
26+
git clone https://github.com/PowerShell/PowerShellEditorServices.git ../PowerShellEditorServices
2927
Install-Module InvokeBuild -Scope CurrentUser -Force
3028
Install-Module PlatyPS -Scope CurrentUser -Force
3129
New-Item -ItemType Directory $(Build.ArtifactStagingDirectory)/vscode-powershell
30+
3231
# Build
3332
- pwsh: Invoke-Build
33+
3434
- task: PublishTestResults@2
3535
inputs:
3636
testRunner: JUnit
3737
testResultsFiles: '**/test-results.xml'
3838
condition: succeededOrFailed()
39+
3940
- task: PublishBuildArtifacts@1
4041
inputs:
4142
ArtifactName: vscode-powershell
4243
PathtoPublish: '$(Build.ArtifactStagingDirectory)/vscode-powershell'
44+
4345
# Rich Navigation
4446
- task: RichCodeNavIndexer@0
4547
# Note, for now, this is Windows only.

.vsts-ci/templates/release-general.yml

+2-23
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,19 @@
11
steps:
22
- checkout: self
33

4-
- pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
5-
displayName: Set Build Name for Non-PR
6-
condition: ne(variables['Build.Reason'], 'PullRequest')
7-
84
- pwsh: |
95
Get-ChildItem -Path env:
106
displayName: Capture environment
117
condition: succeededOrFailed()
128

13-
# TODO: Use modern resources for these variables.
14-
- task: PowerShell@2
15-
displayName: 'Set environment variables for VSTS (Phase 1)'
16-
inputs:
17-
targetType: filePath
18-
filePath: ./vscode-powershell/tools/releaseBuild/setVstsVariables.ps1
19-
20-
# TODO: Remove this when satisfied with added trigger.
21-
- task: PowerShell@2
22-
displayName: 'Find PowerShellEditorServices build'
23-
env:
24-
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
25-
inputs:
26-
targetType: filePath
27-
filePath: ./vscode-powershell/tools/releaseBuild/findPsesBuild.ps1
28-
299
- task: DownloadPipelineArtifact@2
30-
displayName: 'Download Artifacts from PowerShell Editor Services'
10+
displayName: 'Download Artifacts from PowerShellEditorServices'
3111
inputs:
3212
source: specific
3313
project: '8e2735c1-3674-408a-bcab-87f089ea29d5'
3414
pipeline: 1056
3515
preferTriggeringPipeline: true
36-
runVersion: specific
37-
runId: '$(PSES_BUILDID)'
16+
allowPartiallySucceededBuilds: true
3817
artifact: 'PowerShellEditorServices'
3918
path: '$(Build.SourcesDirectory)/PowerShellEditorServices/module/'
4019

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515

1616
#### [PowerShellEditorServices](https://github.com/PowerShell/PowerShellEditorServices)
1717

18+
> NOTE: These changes were intended to be included in this preview release;
19+
> however, a silent pipeline failure led to the previous version of
20+
> PowerShellEditorServices being included instead. These changes will be
21+
> included in the next preview release. See: [#3282](https://github.com/PowerShell/vscode-powershell/issues/3282)
22+
1823
- 🧠✨ [PowerShellEditorServices #1176](https://github.com/PowerShell/PowerShellEditorServices/pull/1427) - Add '$' as trigger character for completion. (Thanks @MartinGC94!)
1924
- 👷🚨✨ [PowerShellEditorServices #1426](https://github.com/PowerShell/PowerShellEditorServices/pull/1426) - Bump CI images and enable tests on Apple M1.
2025
-[PowerShellEditorServices #1424](https://github.com/PowerShell/PowerShellEditorServices/pull/1424) - Update to use OmniSharp 0.19.0.

tools/releaseBuild/findPsesBuild.ps1

-27
This file was deleted.

tools/releaseBuild/setVstsVariables.ps1

-18
This file was deleted.

0 commit comments

Comments
 (0)