diff --git a/.vsts-ci/azure-pipelines-ci.yml b/.vsts-ci/azure-pipelines-ci.yml index d6bb03970a..73e761d389 100644 --- a/.vsts-ci/azure-pipelines-ci.yml +++ b/.vsts-ci/azure-pipelines-ci.yml @@ -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 diff --git a/.vsts-ci/azure-pipelines-release.yml b/.vsts-ci/azure-pipelines-release.yml index 27461d83b0..4fe28b4646 100644 --- a/.vsts-ci/azure-pipelines-release.yml +++ b/.vsts-ci/azure-pipelines-release.yml @@ -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 @@ -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: @@ -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: diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml index cf116304e8..80daf4a81a 100644 --- a/.vsts-ci/templates/ci-general.yml +++ b/.vsts-ci/templates/ci-general.yml @@ -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. diff --git a/.vsts-ci/templates/release-general.yml b/.vsts-ci/templates/release-general.yml index d675054b63..2d1261eb41 100644 --- a/.vsts-ci/templates/release-general.yml +++ b/.vsts-ci/templates/release-general.yml @@ -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. -- 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/' diff --git a/CHANGELOG.md b/CHANGELOG.md index ccbd9d4c6f..6a7d874e2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/tools/releaseBuild/findPsesBuild.ps1 b/tools/releaseBuild/findPsesBuild.ps1 deleted file mode 100644 index 493a816c3c..0000000000 --- a/tools/releaseBuild/findPsesBuild.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -$branch = [uri]::EscapeDataString($env:PSES_BRANCH) -$headers = @{Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"} - -$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch, "succeeded" -$succeededBuilds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers -Write-Host "Requested URL: $buildsUrl" -Write-Host "Got response:`n$(ConvertTo-Json $succeededBuilds)" - -$buildsURL = $buildsURL -replace "branchName", "tagName" -$taggedBuilds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers -Write-Host "Requested URL: $buildsUrl" -Write-Host "Got response:`n$(ConvertTo-Json $taggedBuilds)" - -$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch, "partiallySucceeded" -$partiallySucceededBuilds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers -Write-Host "Requested URL: $buildsUrl" -Write-Host "Got response:`n$(ConvertTo-Json $partiallySucceededBuilds)" - -$builds = @( - $succeededBuilds.value - $taggedBuilds.value - $partiallySucceededBuilds.value - ) | Sort-Object finishTime -Descending - -Write-Host "Got PSES_BRANCH: ${env:PSES_BRANCH}" -Write-Host "setting PSES_BUILDID to $($builds[0].Id)" -Write-Host "##vso[task.setvariable variable=PSES_BUILDID]$($builds[0].Id)" diff --git a/tools/releaseBuild/setVstsVariables.ps1 b/tools/releaseBuild/setVstsVariables.ps1 deleted file mode 100644 index ace8d35f0b..0000000000 --- a/tools/releaseBuild/setVstsVariables.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -$vstsVariables = @{ - PSES_BRANCH = 'master' - PSES_FORK = 'PowerShell' -} - -# Use VSTS's API to set an env vars -foreach ($var in $vstsVariables.Keys) -{ - # Allow environment to override - if (Get-Item "env:$var" -ErrorAction Ignore) - { - continue - } - - $val = $vstsVariables[$var] - Write-Host "Setting var '$var' to value '$val'" - Write-Host "##vso[task.setvariable variable=$var]$val" -}