Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 61 additions & 59 deletions .vsts-ci/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,77 +28,79 @@ pr:
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
# 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
jobs:
- job: Linux_CI
- template: templates/ci-build.yml
parameters:
pool: Hosted Ubuntu 1604
jobName: linux_build
displayName: linux Build

pool:
name: Hosted Ubuntu 1604

timeoutInMinutes: 120
- template: templates/nix-test.yml
parameters:
name: Linux
pool: Hosted Ubuntu 1604
purpose: UnelevatedPesterTests
tagSet: CI
parentJobs:
- linux_build

steps:
- powershell: |
Get-Process
displayName: Capture Processes
condition: succeededOrFailed()

- powershell: |
Get-ChildItem -Path env:
displayName: Capture environment
condition: succeededOrFailed()
- template: templates/nix-test.yml
parameters:
name: Linux
pool: Hosted Ubuntu 1604
purpose: ElevatedPesterTests
tagSet: CI
parentJobs:
- linux_build

- 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()
- template: templates/nix-test.yml
parameters:
name: Linux
pool: Hosted Ubuntu 1604
purpose: UnelevatedPesterTests
tagSet: Others
parentJobs:
- linux_build

- 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')
- template: templates/nix-test.yml
parameters:
name: Linux
pool: Hosted Ubuntu 1604
purpose: ElevatedPesterTests
tagSet: Others
parentJobs:
- linux_build

# 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()
- job: verify_xunit
displayName: Verify xUnit Results
pool:
name: Hosted Ubuntu 1604
dependsOn:
- linux_build
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download build artifacts'
inputs:
downloadType: specific
itemPattern: |
xunit/**/*
downloadPath: '$(System.ArtifactsDirectory)'

- template: ../tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml
- pwsh: |
Get-ChildItem "$(System.ArtifactsDirectory)\*" -Recurse
displayName: 'Capture artifacts directory'
continueOnError: true

- powershell: |
Import-Module ./tools/ci.psm1
Invoke-BootstrapStage
displayName: Bootstrap
condition: succeeded()
- pwsh: |
Import-Module .\tools\ci.psm1
$xUnitTestResultsFile = "$(System.ArtifactsDirectory)\xunit\xUnitTestResults.xml"

- powershell: |
Import-Module ./tools/ci.psm1
$env:NugetKey = '$(NUGET_KEY)'
Invoke-LinuxTests
displayName: Build and Test
Test-XUnitTestResults -TestResultsFile $xUnitTestResultsFile
displayName: Test
condition: succeeded()

# Uploads any packages as an artifact
- powershell: |
Get-ChildItem -Path ${env:BUILD_ARTIFACTSTAGINGDIRECTORY} -Include *.nupkg, *.rpm, *.deb, *.tar.gz, TestPackage.zip -Recurse | Select-Object -ExpandProperty FullName | ForEach-Object {
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$_"
}
displayName: Publish Artifacts
condition: succeededOrFailed()
continueOnError: true
2 changes: 0 additions & 2 deletions .vsts-ci/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
# Turn off Homebrew analytics
HOMEBREW_NO_ANALYTICS: 1
# Enable VSTS debug mode until stabilitized
system.debug: 'true'

resources:
- repo: self
Expand Down