diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml index d37ef417c5..df1616c08d 100644 --- a/.vsts-ci/templates/ci-general.yml +++ b/.vsts-ci/templates/ci-general.yml @@ -3,8 +3,14 @@ steps: - 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 - pwsh: | - git clone https://github.com/PowerShell/PowerShellEditorServices.git ../PowerShellEditorServices + 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 Install-Module InvokeBuild -Scope CurrentUser -Force Install-Module PlatyPS -Scope CurrentUser -Force # Build diff --git a/tools/releaseBuild/setVstsVariables.ps1 b/tools/releaseBuild/setVstsVariables.ps1 index dc42416c73..ace8d35f0b 100644 --- a/tools/releaseBuild/setVstsVariables.ps1 +++ b/tools/releaseBuild/setVstsVariables.ps1 @@ -1,5 +1,6 @@ $vstsVariables = @{ PSES_BRANCH = 'master' + PSES_FORK = 'PowerShell' } # Use VSTS's API to set an env vars