Skip to content

Fix release build pipeline #3286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .vsts-ci/azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,6 @@ trigger:
branches:
include:
- master
- legacy/1.x
paths:
exclude:
- /.dependabot/*
- /.poshchan/*
- /.github/**/*
- /.vscode/**/*
- /.vsts-ci/misc-analysis.yml
- /tools/**/*
- .editorconfig
- .gitattributes
- .gitignore
- /docs/**/*
- /CHANGELOG.md
- /CONTRIBUTING.md
- /README.md
- /LICENSE
- /CODE_OF_CONDUCT.md

jobs:
- job: Windows
Expand Down
32 changes: 5 additions & 27 deletions .vsts-ci/azure-pipelines-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)

variables:
# Don't download unneeded packages
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
Expand All @@ -9,28 +7,9 @@ variables:
value: 'true'

trigger:
batch: true
branches:
include:
- master
- legacy/1.x
paths:
exclude:
- /.dependabot/*
- /.poshchan/*
- /.github/**/*
- /.vscode/**/*
- /.vsts-ci/misc-analysis.yml
- /tools/**/*
- .editorconfig
- .gitattributes
- .gitignore
- /docs/**/*
- /CHANGELOG.md
- /CONTRIBUTING.md
- /README.md
- /LICENSE
- /CODE_OF_CONDUCT.md
- release/*

resources:
repositories:
Expand All @@ -43,13 +22,12 @@ resources:
source: PowerShellEditorServices
trigger:
branches:
- master
- releases/*
- changelog*
- refs/tags/*
include:
- release/*
tags:
- v*

jobs:

- job: 'ReleaseBuild'
displayName: 'Build release'
pool:
Expand Down
16 changes: 9 additions & 7 deletions .vsts-ci/templates/ci-general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,35 @@ steps:
Write-Host "##vso[task.prependpath]$powerShellPath"
continueOnError: true
displayName: Install PowerShell Daily

- pwsh: '$PSVersionTable'
displayName: Display PowerShell version information

- pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
displayName: Set Build Name for Non-PR
condition: ne(variables['Build.Reason'], 'PullRequest')
- task: PowerShell@2
displayName: 'Set environment variables for VSTS (Phase 1)'
inputs:
targetType: filePath
filePath: ./tools/releaseBuild/setVstsVariables.ps1

# TODO: Use a submodule or some such so we can actually track a version here.
- pwsh: |
Write-Host "Cloning '$env:PSES_BRANCH' branch from '$env:PSES_FORK/PowerShellEditorServices'"
git clone --single-branch --branch $env:PSES_BRANCH https://github.com/$env:PSES_FORK/PowerShellEditorServices.git ../PowerShellEditorServices
git clone https://github.com/PowerShell/PowerShellEditorServices.git ../PowerShellEditorServices
Install-Module InvokeBuild -Scope CurrentUser -Force
Install-Module PlatyPS -Scope CurrentUser -Force
New-Item -ItemType Directory $(Build.ArtifactStagingDirectory)/vscode-powershell

# Build
- pwsh: Invoke-Build

- task: PublishTestResults@2
inputs:
testRunner: JUnit
testResultsFiles: '**/test-results.xml'
condition: succeededOrFailed()

- task: PublishBuildArtifacts@1
inputs:
ArtifactName: vscode-powershell
PathtoPublish: '$(Build.ArtifactStagingDirectory)/vscode-powershell'

# Rich Navigation
- task: RichCodeNavIndexer@0
# Note, for now, this is Windows only.
Expand Down
25 changes: 2 additions & 23 deletions .vsts-ci/templates/release-general.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,19 @@
steps:
- checkout: self

- pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
displayName: Set Build Name for Non-PR
condition: ne(variables['Build.Reason'], 'PullRequest')

- pwsh: |
Get-ChildItem -Path env:
displayName: Capture environment
condition: succeededOrFailed()

# TODO: Use modern resources for these variables.
- task: PowerShell@2
displayName: 'Set environment variables for VSTS (Phase 1)'
inputs:
targetType: filePath
filePath: ./vscode-powershell/tools/releaseBuild/setVstsVariables.ps1

# TODO: Remove this when satisfied with added trigger.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rjmholt This TODO bit us good.

- task: PowerShell@2
displayName: 'Find PowerShellEditorServices build'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
targetType: filePath
filePath: ./vscode-powershell/tools/releaseBuild/findPsesBuild.ps1

- task: DownloadPipelineArtifact@2
displayName: 'Download Artifacts from PowerShell Editor Services'
displayName: 'Download Artifacts from PowerShellEditorServices'
inputs:
source: specific
project: '8e2735c1-3674-408a-bcab-87f089ea29d5'
pipeline: 1056
preferTriggeringPipeline: true
runVersion: specific
runId: '$(PSES_BUILDID)'
allowPartiallySucceededBuilds: true
artifact: 'PowerShellEditorServices'
path: '$(Build.SourcesDirectory)/PowerShellEditorServices/module/'

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@

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

Please note that these changes were intended to be included in this preview
release; however, a silent pipeline failure led to the previous version of
PowerShellEditorServices being included instead. These changes will be included
in the next preview release. See:
[#3282](https://github.com/PowerShell/vscode-powershell/issues/3282)

- 🧠✨ [PowerShellEditorServices #1176](https://github.com/PowerShell/PowerShellEditorServices/pull/1427) - Add '$' as trigger character for completion. (Thanks @MartinGC94!)
- 👷🚨✨ [PowerShellEditorServices #1426](https://github.com/PowerShell/PowerShellEditorServices/pull/1426) - Bump CI images and enable tests on Apple M1.
- ✨ [PowerShellEditorServices #1424](https://github.com/PowerShell/PowerShellEditorServices/pull/1424) - Update to use OmniSharp 0.19.0.
Expand Down
27 changes: 0 additions & 27 deletions tools/releaseBuild/findPsesBuild.ps1

This file was deleted.

18 changes: 0 additions & 18 deletions tools/releaseBuild/setVstsVariables.ps1

This file was deleted.