2018-08-18 07:06:51 +02:00
|
|
|
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
|
|
|
|
queue:
|
|
|
|
name: Hosted VS2017
|
|
|
|
parallel: 2 # Limit to two agents at a time
|
|
|
|
matrix:
|
|
|
|
UnelevatedPesterTests:
|
|
|
|
Purpose: UnelevatedPesterTests
|
|
|
|
ElevatedPesterTests_xUnit_Packaging:
|
|
|
|
Purpose: ElevatedPesterTests_xUnit_Packaging
|
|
|
|
|
|
|
|
variables:
|
|
|
|
GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
|
|
# Avoid expensive initialization of dotnet cli, see: http://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds
|
|
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
|
|
|
|
|
|
|
resources:
|
|
|
|
- repo: self
|
|
|
|
clean: true
|
|
|
|
|
|
|
|
steps:
|
2018-09-06 21:27:49 +02:00
|
|
|
- powershell: |
|
|
|
|
Get-ChildItem -Path env:
|
|
|
|
displayName: Capture environment
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
|
2018-08-18 07:06:51 +02:00
|
|
|
displayName: Set Build Name for Non-PR
|
|
|
|
condition: ne(variables['Build.Reason'], 'PullRequest')
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
git submodule update --init
|
|
|
|
displayName: SubModule Init
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
|
|
|
Import-Module .\tools\Appveyor.psm1
|
|
|
|
Invoke-AppveyorInstall
|
|
|
|
displayName: Bootstrap
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
Import-Module .\tools\Appveyor.psm1
|
|
|
|
Invoke-AppveyorBuild
|
|
|
|
Save-PSOptions
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
Import-Module .\tools\Appveyor.psm1
|
|
|
|
Restore-PSOptions
|
|
|
|
Invoke-AppveyorTest -Purpose '$(Purpose)'
|
|
|
|
displayName: Test
|
|
|
|
condition: succeeded()
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
Import-Module .\tools\Appveyor.psm1
|
|
|
|
Restore-PSOptions
|
|
|
|
Invoke-AppveyorAfterTest
|
|
|
|
displayName: AfterTest
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
Import-Module .\tools\Appveyor.psm1
|
|
|
|
Restore-PSOptions
|
|
|
|
Invoke-AppveyorFinish
|
|
|
|
displayName: Finish
|
|
|
|
condition: eq(variables['Purpose'], 'ElevatedPesterTests_xUnit_Packaging')
|