2018-12-02 03:25:55 +03:00
|
|
|
variables:
|
|
|
|
Build.Repository.Clean: true
|
|
|
|
_TeamName: DotNetCore
|
|
|
|
|
|
|
|
# Variables for public PR builds
|
|
|
|
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'github')) }}:
|
|
|
|
_HelixType: build/product
|
|
|
|
_HelixSource: pr/aspnet/AspNetCore-Tooling/$(Build.SourceBranch)
|
|
|
|
# These are needed to suppress a warning in the cibuild invocation since AzDO leaves the `$(_SignArgs)` in place and it fails to resolve.
|
|
|
|
_SignArgs: ''
|
|
|
|
_OfficialBuildIdArgs: ''
|
|
|
|
|
|
|
|
# Variables for internal Official builds
|
|
|
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'official')) }}:
|
|
|
|
_HelixType: build/product
|
|
|
|
_HelixSource: official/aspnet/AspNetCore-Tooling/$(Build.SourceBranch)
|
|
|
|
_SignType: test
|
|
|
|
_SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
|
|
|
|
_OfficialBuildIdArgs: /p:OfficialBuildId=$(Build.BuildNumber)
|
|
|
|
|
|
|
|
resources:
|
|
|
|
containers:
|
|
|
|
- container: LinuxContainer
|
|
|
|
image: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
- master
|
|
|
|
|
|
|
|
pr:
|
|
|
|
- "*"
|
|
|
|
|
|
|
|
# Three phases for each of the three OSes we want to run on
|
|
|
|
phases:
|
|
|
|
- template: /eng/common/templates/phases/base.yml
|
|
|
|
parameters:
|
|
|
|
name: Windows
|
|
|
|
enableTelemetry: true
|
|
|
|
# enableMicrobuild can't be read from a user-defined variable (Azure DevOps limitation)
|
|
|
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'official')) }}:
|
|
|
|
enableMicrobuild: true
|
|
|
|
queue:
|
|
|
|
# agent pool can't be read from a user-defined variable (Azure DevOps limitation)
|
|
|
|
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'github')) }}:
|
|
|
|
name: dotnet-external-temp
|
|
|
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'official')) }}:
|
|
|
|
name: dotnet-internal-temp
|
|
|
|
matrix:
|
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
steps:
|
|
|
|
- script: eng\common\cibuild.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
|
|
|
$(_SignArgs)
|
|
|
|
$(_OfficialBuildIdArgs)
|
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish xUnit Test Results
|
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
testRunner: xunit
|
|
|
|
testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Packages
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: Packages_$(Agent.Os)_$(Agent.JobName)
|
|
|
|
continueOnError: true
|
|
|
|
condition: always()
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Logs
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: Logs_$(Agent.Os)_$(Agent.JobName)
|
|
|
|
continueOnError: true
|
|
|
|
condition: always()
|
|
|
|
variables:
|
|
|
|
_HelixBuildConfig: $(_BuildConfig)
|
|
|
|
|
|
|
|
- template: /eng/common/templates/phases/base.yml
|
|
|
|
parameters:
|
|
|
|
name: macOS
|
|
|
|
enableTelemetry: true
|
|
|
|
queue:
|
|
|
|
name: Hosted macOS
|
|
|
|
matrix:
|
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
steps:
|
|
|
|
- script: eng/common/cibuild.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish xUnit Test Results
|
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
testRunner: xunit
|
|
|
|
testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Logs
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: Logs_$(Agent.Os)_$(Agent.JobName)
|
|
|
|
continueOnError: true
|
|
|
|
condition: always()
|
|
|
|
variables:
|
|
|
|
_HelixBuildConfig: $(_BuildConfig)
|
|
|
|
|
|
|
|
- template: /eng/common/templates/phases/base.yml
|
|
|
|
parameters:
|
|
|
|
name: Linux
|
|
|
|
enableTelemetry: true
|
|
|
|
queue:
|
|
|
|
name: Hosted Ubuntu 1604
|
|
|
|
container: LinuxContainer
|
|
|
|
matrix:
|
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
steps:
|
|
|
|
- script: eng/common/cibuild.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
2018-12-02 04:52:36 +03:00
|
|
|
env: { LC_ALL: en_US.UTF-8 } # workaround an issue with bash + MSBuild
|
2018-12-02 03:25:55 +03:00
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish xUnit Test Results
|
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
testRunner: xunit
|
|
|
|
testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Logs
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: Logs_$(Agent.Os)_$(Agent.JobName)
|
|
|
|
continueOnError: true
|
|
|
|
condition: always()
|
|
|
|
variables:
|
|
|
|
_HelixBuildConfig: $(_BuildConfig)
|