2018-10-17 22:17:40 +00:00
|
|
|
parameters:
|
|
|
|
agentOs: ''
|
|
|
|
queue: {}
|
|
|
|
variables: {}
|
|
|
|
|
|
|
|
phases:
|
|
|
|
- template: /eng/common/templates/phases/base.yml
|
|
|
|
parameters:
|
|
|
|
name: ${{ parameters.agentOs }}
|
|
|
|
enableTelemetry: true
|
2018-11-07 07:40:20 +00:00
|
|
|
enableMicrobuild: true
|
2018-10-17 22:17:40 +00:00
|
|
|
publicBuildReasons: PullRequest
|
|
|
|
queue: ${{ parameters.queue }}
|
|
|
|
variables:
|
|
|
|
${{ insert }}: ${{ parameters.variables }}
|
|
|
|
_AgentOSName: ${{ parameters.agentOs }}
|
|
|
|
_HelixType: build/product
|
|
|
|
_HelixBuildConfig: $(_BuildConfig)
|
|
|
|
BuildConfig: $(_BuildConfig)
|
|
|
|
BuildArchitecture: $(_BuildArchitecture)
|
|
|
|
_HelixSource: pr/dotnet/core-sdk/$(Build.SourceBranch)
|
|
|
|
DockerParameter: $(_DockerParameter)
|
|
|
|
LinuxPortable: $(_LinuxPortable)
|
|
|
|
RuntimeId: $(_RuntimeIdentifier)
|
2018-11-09 22:15:41 +00:00
|
|
|
AdditionalBuildParameters: $(_AdditionalBuildParameters)
|
2018-10-17 22:17:40 +00:00
|
|
|
|
|
|
|
steps:
|
2018-11-28 02:48:13 +00:00
|
|
|
- script: 'eng\setcitestinfo.bat $(BuildArchitecture)'
|
|
|
|
condition: eq(variables['_AgentOSName'], 'Windows_NT')
|
|
|
|
displayName: Set test info (Windows)
|
|
|
|
- script: 'eng/setcitestinfo.sh $(BuildArchitecture)'
|
|
|
|
condition: ne(variables['_AgentOSName'], 'Windows_NT')
|
|
|
|
displayName: Set test info (Non-Windows)
|
|
|
|
- script: 'echo TestParameter: $(TestParameter)'
|
|
|
|
displayName: Show TestParameter
|
|
|
|
- script: 'echo RunTests: $(RunTests)'
|
|
|
|
displayName: Show RunTests
|
2018-10-17 22:17:40 +00:00
|
|
|
- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
|
|
|
|
- script: build.cmd
|
2018-11-28 02:48:13 +00:00
|
|
|
$(TestParameter)
|
|
|
|
-pack -publish
|
2018-10-17 22:17:40 +00:00
|
|
|
-Configuration $(BuildConfig)
|
|
|
|
-Architecture $(BuildArchitecture)
|
2018-11-09 22:15:41 +00:00
|
|
|
$(AdditionalBuildParameters)
|
2018-10-17 22:17:40 +00:00
|
|
|
displayName: Build
|
|
|
|
env:
|
|
|
|
DOTNET_CLI_UI_LANGUAGE: $(_DOTNET_CLI_UI_LANGUAGE)
|
|
|
|
DropSuffix: $(_DropSuffix)
|
|
|
|
|
|
|
|
- ${{ if eq(parameters.agentOs, 'Linux') }}:
|
|
|
|
- script: ./build.sh
|
2018-11-28 02:48:13 +00:00
|
|
|
$(TestParameter)
|
|
|
|
--pack --publish
|
2018-11-08 07:20:01 +00:00
|
|
|
--noprettyprint
|
2018-10-17 22:17:40 +00:00
|
|
|
--configuration $(BuildConfig)
|
|
|
|
$(DockerParameter)
|
|
|
|
--architecture $(BuildArchitecture)
|
|
|
|
$(LinuxPortable)
|
|
|
|
$(RuntimeId)
|
2018-11-09 22:15:41 +00:00
|
|
|
$(AdditionalBuildParameters)
|
2018-10-17 22:17:40 +00:00
|
|
|
displayName: Build
|
|
|
|
env:
|
|
|
|
DropSuffix: $(_DropSuffix)
|
|
|
|
|
|
|
|
- ${{ if eq(parameters.agentOs, 'Darwin') }}:
|
|
|
|
- script: ./build.sh
|
2018-11-28 02:48:13 +00:00
|
|
|
$(TestParameter)
|
|
|
|
--pack --publish
|
2018-11-08 07:20:01 +00:00
|
|
|
--noprettyprint
|
2018-10-17 22:17:40 +00:00
|
|
|
--configuration $(BuildConfig)
|
|
|
|
displayName: Build
|
|
|
|
|
|
|
|
- task: PublishTestResults@1
|
|
|
|
displayName: Publish Test Results
|
|
|
|
inputs:
|
2018-11-07 07:40:20 +00:00
|
|
|
testRunner: XUnit
|
|
|
|
testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml'
|
2018-11-21 23:57:14 +00:00
|
|
|
testRunTitle: '$(_AgentOSName)_$(Agent.JobName)'
|
2018-10-17 22:17:40 +00:00
|
|
|
platform: '$(BuildPlatform)'
|
|
|
|
configuration: '$(_BuildConfig)'
|
2018-11-28 02:48:13 +00:00
|
|
|
condition: and(succeededOrFailed(), ne(variables['PB_SkipTests'], 'true'), ne(variables['RunTests'], 'false'))
|
2018-10-17 22:17:40 +00:00
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: Gather Logs
|
|
|
|
inputs:
|
|
|
|
SourceFolder: '$(Build.SourcesDirectory)'
|
|
|
|
Contents: |
|
2018-11-07 07:40:20 +00:00
|
|
|
artifacts/log/$(_BuildConfig)/**/*
|
|
|
|
artifacts/TestResults/$(_BuildConfig)/**/*
|
2018-10-17 22:17:40 +00:00
|
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
continueOnError: true
|
|
|
|
condition: always()
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Logs to VSTS
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)'
|
|
|
|
publishLocation: Container
|
|
|
|
continueOnError: true
|
|
|
|
condition: always()
|