2018-08-11 00:13:31 +02:00
|
|
|
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
|
2018-11-09 20:38:44 +01:00
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- release*
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
exclude:
|
|
|
|
- /tools/releaseBuild/**/*
|
|
|
|
- /.vsts-ci/spelling.yml
|
|
|
|
pr:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- release*
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
exclude:
|
|
|
|
- /tools/releaseBuild/**/*
|
|
|
|
- /.vsts-ci/spelling.yml
|
2018-08-11 00:13:31 +02:00
|
|
|
variables:
|
|
|
|
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
|
|
|
|
# Enable VSTS debug mode until stabilitized
|
|
|
|
system.debug: 'true'
|
|
|
|
|
|
|
|
resources:
|
|
|
|
- repo: self
|
|
|
|
clean: true
|
2018-12-05 01:57:29 +01:00
|
|
|
jobs:
|
|
|
|
- job: macOS_CI
|
2018-08-11 00:13:31 +02:00
|
|
|
|
2018-12-05 01:57:29 +01:00
|
|
|
pool:
|
2018-09-06 21:27:49 +02:00
|
|
|
name: Hosted macOS
|
2018-12-05 01:57:29 +01:00
|
|
|
|
|
|
|
timeoutInMinutes: 120
|
|
|
|
|
2018-08-11 00:13:31 +02:00
|
|
|
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-11 00:13:31 +02:00
|
|
|
displayName: Set Build Name for Non-PR
|
|
|
|
condition: ne(variables['Build.Reason'], 'PullRequest')
|
|
|
|
|
|
|
|
- powershell: |
|
2018-11-06 18:52:14 +01:00
|
|
|
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'], ''))
|
2018-08-11 00:13:31 +02:00
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
tools/travis.ps1 -Stage Bootstrap
|
|
|
|
displayName: Bootstrap
|
|
|
|
condition: succeeded()
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
$ErrorActionPreference = 'continue'
|
|
|
|
tools/travis.ps1
|
|
|
|
displayName: Build and test
|
|
|
|
condition: succeeded()
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
tools/travis.ps1 -Stage Failure
|
|
|
|
displayName: After Failure
|
|
|
|
condition: failed()
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
tools/travis.ps1 -Stage Success
|
|
|
|
displayName: After Success
|
|
|
|
condition: succeeded()
|
|
|
|
|
|
|
|
# Uploads any packages as an artifact
|
|
|
|
- powershell: |
|
2018-10-29 22:13:05 +01:00
|
|
|
Get-ChildItem -Path *.pkg, *.tar.gz, TestPackage.zip -Recurse | Select-Object -ExpandProperty FullName | ForEach-Object {
|
2018-08-11 00:13:31 +02:00
|
|
|
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$_"
|
|
|
|
}
|
|
|
|
displayName: Publish Artifacts
|
2018-08-30 02:03:41 +02:00
|
|
|
condition: ne(variables['Build.Reason'], 'PullRequest')
|
2018-08-14 00:44:33 +02:00
|
|
|
continueOnError: true
|