* Rename spelling.yml to misc-analysis.yml * Update mac.yml * Update windows.yml * Update README.md
99 lines
2.9 KiB
YAML
99 lines
2.9 KiB
YAML
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- master
|
|
- release*
|
|
paths:
|
|
include:
|
|
- '*'
|
|
exclude:
|
|
- /tools/releaseBuild/**/*
|
|
- /.vsts-ci/misc-analysis.yml
|
|
pr:
|
|
branches:
|
|
include:
|
|
- master
|
|
- release*
|
|
paths:
|
|
include:
|
|
- '*'
|
|
exclude:
|
|
- /tools/releaseBuild/**/*
|
|
- /.vsts-ci/misc-analysis.yml
|
|
queue:
|
|
name: Hosted VS2017
|
|
parallel: 2 # Limit to two agents at a time
|
|
matrix:
|
|
UnelevatedPesterTests:
|
|
Purpose: UnelevatedPesterTests
|
|
ElevatedPesterTests_xUnit_Packaging:
|
|
Purpose: ElevatedPesterTests_xUnit_Packaging
|
|
timeoutInMinutes: 120
|
|
|
|
variables:
|
|
GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
# Avoid expensive initialization of dotnet cli, see: https://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
|
|
|
|
resources:
|
|
- repo: self
|
|
clean: true
|
|
|
|
steps:
|
|
- 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"))"
|
|
displayName: Set Build Name for Non-PR
|
|
condition: ne(variables['Build.Reason'], 'PullRequest')
|
|
|
|
- powershell: |
|
|
Import-Module $(Build.SourcesDirectory)/build.psm1 -Force
|
|
New-NugetConfigFile -NugetFeedUrl $(AzDevOpsFeed) -UserName $(AzDevOpsFeedUserName) -ClearTextPAT $(AzDevOpsFeedPAT) -FeedName AzDevOpsFeed -Destination $(Build.SourcesDirectory)/src/Modules
|
|
|
|
if(-not (Test-Path "$(Build.SourcesDirectory)/src/Modules/nuget.config"))
|
|
{
|
|
throw "nuget.config is not created"
|
|
}
|
|
displayName: 'Add nuget.config for AzDevOps feed for PSGallery modules '
|
|
condition: and(succeededOrFailed(), ne(variables['AzDevOpsFeed'], ''))
|
|
|
|
- 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 -NuGetKey $(NUGET_KEY)
|
|
displayName: Finish
|
|
condition: eq(variables['Purpose'], 'ElevatedPesterTests_xUnit_Packaging')
|