2018-08-15 01:23:50 +02:00
|
|
|
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
|
2018-11-09 20:38:44 +01:00
|
|
|
trigger:
|
2019-01-17 00:29:46 +01:00
|
|
|
# Batch merge builds together while a merge build is running
|
|
|
|
batch: true
|
2018-11-09 20:38:44 +01:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- release*
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
exclude:
|
|
|
|
- /tools/releaseBuild/**/*
|
2019-01-07 21:54:13 +01:00
|
|
|
- /.vsts-ci/misc-analysis.yml
|
2018-11-09 20:38:44 +01:00
|
|
|
pr:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- release*
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
exclude:
|
|
|
|
- /tools/releaseBuild/**/*
|
2019-01-07 21:54:13 +01:00
|
|
|
- /.vsts-ci/misc-analysis.yml
|
2018-08-15 01:23:50 +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
|
|
|
|
|
|
|
|
resources:
|
|
|
|
- repo: self
|
|
|
|
clean: true
|
2018-12-05 01:57:29 +01:00
|
|
|
jobs:
|
|
|
|
- job: Linux_CI
|
2018-08-15 01:23:50 +02:00
|
|
|
|
2018-12-05 01:57:29 +01:00
|
|
|
pool:
|
2018-09-06 21:27:49 +02:00
|
|
|
name: Hosted Ubuntu 1604
|
2018-12-05 01:57:29 +01:00
|
|
|
|
|
|
|
timeoutInMinutes: 120
|
|
|
|
|
2018-08-15 01:23:50 +02:00
|
|
|
steps:
|
2018-09-19 01:47:52 +02:00
|
|
|
- powershell: |
|
|
|
|
Get-Process
|
|
|
|
displayName: Capture Processes
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
2018-09-06 21:27:49 +02:00
|
|
|
- powershell: |
|
|
|
|
Get-ChildItem -Path env:
|
|
|
|
displayName: Capture environment
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
2018-09-19 01:47:52 +02:00
|
|
|
- powershell: |
|
|
|
|
# sometimes the file is locked and we must wait or things will fail
|
|
|
|
$filePath = '/var/lib/dpkg/lock'
|
|
|
|
$lockList = sudo lsof '/var/lib/dpkg/lock'
|
|
|
|
while($lockList)
|
|
|
|
{
|
|
|
|
Write-Verbose "waiting..." -verbose
|
|
|
|
Write-Verbose ($lockList -join "`n") -verbose
|
|
|
|
Start-Sleep -Second 30
|
|
|
|
$lockList = sudo lsof $filePath
|
|
|
|
}
|
|
|
|
exit 0
|
|
|
|
displayName: Wait for /var/lib/dpkg/lock
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
2018-09-06 21:27:49 +02:00
|
|
|
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
|
2018-08-15 01:23:50 +02:00
|
|
|
displayName: Set Build Name for Non-PR
|
|
|
|
condition: ne(variables['Build.Reason'], 'PullRequest')
|
|
|
|
|
|
|
|
# Several scripts require TMPDIR to exist
|
|
|
|
# Set it to AGENT_TEMPDIRECTORY so that we know it exists
|
|
|
|
- powershell: |
|
|
|
|
Write-Host "##vso[task.setvariable variable=TEMP]$env:AGENT_TEMPDIRECTORY"
|
|
|
|
displayName: Set TEMP to AGENT_TEMPDIRECTORY
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
2019-02-01 19:59:01 +01:00
|
|
|
- template: ../tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml
|
2018-08-15 01:23:50 +02:00
|
|
|
|
|
|
|
- powershell: |
|
2019-02-08 23:37:36 +01:00
|
|
|
Import-Module ./tools/ci.psm1
|
2019-03-11 21:00:22 +01:00
|
|
|
Invoke-BootstrapStage
|
2018-08-15 01:23:50 +02:00
|
|
|
displayName: Bootstrap
|
|
|
|
condition: succeeded()
|
|
|
|
|
|
|
|
- powershell: |
|
2019-02-08 23:37:36 +01:00
|
|
|
Import-Module ./tools/ci.psm1
|
|
|
|
$env:NugetKey = '$(NUGET_KEY)'
|
|
|
|
Invoke-LinuxTests
|
|
|
|
displayName: Build and Test
|
2018-08-15 01:23:50 +02:00
|
|
|
condition: succeeded()
|
|
|
|
|
|
|
|
# Uploads any packages as an artifact
|
|
|
|
- powershell: |
|
2019-02-04 23:53:25 +01:00
|
|
|
Get-ChildItem -Path ${env:BUILD_ARTIFACTSTAGINGDIRECTORY} -Include *.nupkg, *.rpm, *.deb, *.tar.gz, TestPackage.zip -Recurse | Select-Object -ExpandProperty FullName | ForEach-Object {
|
2018-08-15 01:23:50 +02:00
|
|
|
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$_"
|
|
|
|
}
|
|
|
|
displayName: Publish Artifacts
|
2019-02-04 23:53:25 +01:00
|
|
|
condition: succeededOrFailed()
|
2018-08-15 01:23:50 +02:00
|
|
|
continueOnError: true
|