Set test run title and asset filename in CI
This commit is contained in:
parent
736be254d3
commit
a1a83b0244
1 changed files with 31 additions and 2 deletions
|
@ -20,9 +20,7 @@ phases:
|
||||||
name: ${{ parameters.agentOs }}
|
name: ${{ parameters.agentOs }}
|
||||||
${{ if eq(parameters.agentOs, 'Windows_NT') }}:
|
${{ if eq(parameters.agentOs, 'Windows_NT') }}:
|
||||||
enableMicrobuild: true
|
enableMicrobuild: true
|
||||||
enablePublishBuildArtifacts: true
|
|
||||||
enablePublishBuildAssets: true
|
enablePublishBuildAssets: true
|
||||||
enablePublishTestResults: true
|
|
||||||
enableTelemetry: true
|
enableTelemetry: true
|
||||||
helixRepo: dotnet/core-sdk
|
helixRepo: dotnet/core-sdk
|
||||||
pool: ${{ parameters.pool }}
|
pool: ${{ parameters.pool }}
|
||||||
|
@ -30,6 +28,7 @@ phases:
|
||||||
strategy: ${{ parameters.strategy }}
|
strategy: ${{ parameters.strategy }}
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
- _AgentOSName: ${{ parameters.agentOs }}
|
||||||
- _TeamName: Roslyn-Project-System
|
- _TeamName: Roslyn-Project-System
|
||||||
- _BuildArgs: ''
|
- _BuildArgs: ''
|
||||||
- _SignType: test
|
- _SignType: test
|
||||||
|
@ -99,6 +98,36 @@ phases:
|
||||||
$(_AdditionalBuildParameters)
|
$(_AdditionalBuildParameters)
|
||||||
displayName: Build
|
displayName: Build
|
||||||
|
|
||||||
|
- task: PublishTestResults@1
|
||||||
|
displayName: Publish Test Results
|
||||||
|
inputs:
|
||||||
|
testRunner: XUnit
|
||||||
|
testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml'
|
||||||
|
testRunTitle: '$(_AgentOSName)_$(Agent.JobName)'
|
||||||
|
platform: '$(BuildPlatform)'
|
||||||
|
configuration: '$(_BuildConfig)'
|
||||||
|
condition: not(succeeded())
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: Gather Logs
|
||||||
|
inputs:
|
||||||
|
SourceFolder: '$(Build.SourcesDirectory)/artifacts'
|
||||||
|
Contents: |
|
||||||
|
log/$(_BuildConfig)/**/*
|
||||||
|
TestResults/$(_BuildConfig)/**/*
|
||||||
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
continueOnError: true
|
||||||
|
condition: not(succeeded())
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: Publish Logs to VSTS
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)'
|
||||||
|
publishLocation: Container
|
||||||
|
continueOnError: true
|
||||||
|
condition: not(succeeded())
|
||||||
|
|
||||||
- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||||
- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
displayName: Gather Asset Manifests
|
displayName: Gather Asset Manifests
|
||||||
|
|
Loading…
Reference in a new issue