aspnetcore/.azure/pipelines/jobs/default-build.yml

543 строки
25 KiB
YAML

# default-build.yml
# Description: Defines a build phase for invoking build.sh/cmd
# Parameters:
# jobName: string
# The name of the job. Defaults to the name of the OS. No spaces allowed
# jobDisplayName: string
# The friendly job name to display in the UI. Defaults to the name of the OS.
# agentOs: string
# Used in templates to define variables which are OS specific. Typically from the set { Windows, Linux, macOS }
# buildArgs: string
# Additional arguments to pass to the build.sh/cmd script.
# Note: -ci is always passed
# beforeBuild: [steps]
# Additional steps to run before build.sh/cmd
# steps: [steps]
# Instead of running build.cmd/sh, run these build steps.
# afterBuild: [steps]
# Additional steps to run after build.sh/cmd
# artifacts: [array]
# name: string
# The name of the artifact container
# - path: string
# The file path to artifacts output
# includeForks: boolean
# Should artifacts from forks be published?
# publishOnError: boolean
# Should artifacts be published if previous step failed?
# dependsOn: string | [ string ]
# For fan-out/fan-in. https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job
# condition: string
# A condition which can be used to skip the job completely
# codeSign: boolean
# This build definition is enabled for code signing. (Only applies to Windows)
# buildDirectory: string
# Specifies what directory to run build.sh/cmd
# isAzDOTestingJob: boolean
# Determines if this job runs tests on the AzDO build agent. Controls some (currently Windows-only)
# installations and enables test publication (unless enablePublishTestResults is overridden).
# enablePublishTestResults: boolean
# Determines if test results should be published. Defaults to the isAzDOTestingJob setting.
# enableSbom: boolean
# Determines if an SBOM should be created. Defaults to true. Ignored in public builds.
# variables: [array]
# Job-specific variables. Defined using either name/value pairs or a variable list (using name or group syntax).
#
# See https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for details
#
parameters:
# jobName: '' - use agentOs by default.
# jobDisplayName: '' - use agentOs by default.
agentOs: 'Windows'
buildArgs: ''
beforeBuild: []
# steps: [] don't define an empty object default because there is no way in template expression yet to check "if isEmpty(parameters.steps)"
afterBuild: []
artifacts: []
dependsOn: ''
condition: ''
codeSign: false
buildDirectory: $(System.DefaultWorkingDirectory)/eng/
isAzDOTestingJob: false
enablePublishTestResults: ''
enableSbom: true
variables: []
configuration: 'Release'
container: ''
enableRichCodeNavigation: ''
installNodeJs: true
timeoutInMinutes: 180
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
useHostedUbuntu: true
# We need longer than the default amount of 5 minutes to upload our logs/artifacts. (We currently take around 5 mins in the best case).
# This makes sure we have time to upload everything in the case of a build timeout - really important for investigating a build
# timeout due to test hangs.
cancelTimeoutInMinutes: 15
jobs:
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
- template: /eng/common/templates/job/job.yml@self
parameters:
name: ${{ coalesce(parameters.jobName, parameters.agentOs) }}
displayName: ${{ coalesce(parameters.jobDisplayName, parameters.agentOs) }}
dependsOn: ${{ parameters.dependsOn }}
${{ if ne(parameters.condition, '') }}:
condition: ${{ parameters.condition }}
${{ if ne(parameters.enableRichCodeNavigation, '') }}:
enableRichCodeNavigation: true
richCodeNavigationLanguage: 'csharp,typescript,java'
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }}
${{ if and(eq(parameters.isAzDOTestingJob, true), ne(parameters.enablePublishTestResults, false)) }}:
enablePublishTestResults: true
testResultsFormat: xUnit # Have no vsTest results in any job.
mergeTestResults: true
testRunTitle: ${{ parameters.testRunTitle }}
enableSbom: ${{ parameters.enableSbom }}
enableTelemetry: true
helixRepo: dotnet/aspnetcore
helixType: build.product/
workspace:
clean: all
# Map friendly OS names to the right queue
# See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md
pool:
${{ if eq(parameters.agentOs, 'macOS') }}:
vmImage: macOS-13
${{ if eq(parameters.agentOs, 'Linux') }}:
${{ if eq(parameters.useHostedUbuntu, true) }}:
vmImage: ubuntu-20.04
${{ if eq(parameters.useHostedUbuntu, false) }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2004.Amd64.Open
${{ if eq(parameters.agentOs, 'Windows') }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2022preview.amd64.open
${{ if ne(parameters.container, '') }}:
container: ${{ parameters.container }}
${{ if ne(parameters.disableComponentGovernance, '') }}:
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
variables:
- AgentOsName: ${{ parameters.agentOs }}
- ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping
- BuildScriptArgs: ${{ parameters.buildArgs }}
- _BuildConfig: ${{ parameters.configuration }}
- BuildConfiguration: ${{ parameters.configuration }}
- BuildDirectory: ${{ parameters.buildDirectory }}
- DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- TeamName: AspNetCore
- ${{ if ne(parameters.codeSign, true) }}:
- _SignType: ''
- LC_ALL: 'en_US.UTF-8'
- LANG: 'en_US.UTF-8'
- LANGUAGE: 'en_US.UTF-8'
# Log environment variables in binary logs to ease debugging
- MSBUILDLOGALLENVIRONMENTVARIABLES: true
# Rely on task Arcade injects, not auto-injected build step.
- skipComponentGovernanceDetection: true
- ${{ each variable in parameters.variables }}:
# handle a variable list using "name" and "value" properties
# example:
# - name: [key]
# value: [value]
- ${{ if ne(variable.name, '') }}:
- name: ${{ variable.name }}
value: ${{ variable.value }}
# handle variable groups
- ${{ if ne(variable.group, '') }}:
- group: ${{ variable.group }}
# handle name/value pairs (converting them into variable list entries)
# example:
# - [name]: [value]
- ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}:
- ${{ each pair in variable }}:
- name: ${{ pair.key }}
value: ${{ pair.value }}
steps:
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: df -h
displayName: Disk size
- ${{ if eq(parameters.agentOs, 'macOS') }}:
- script: sudo xcode-select -s /Applications/Xcode_15.2.0.app/Contents/Developer
displayName: Use XCode 15.2.0
- checkout: self
clean: true
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}:
- powershell: ./eng/scripts/InstallProcDump.ps1
displayName: Install ProcDump
- powershell: ./eng/scripts/StartDumpCollectionForHangingBuilds.ps1 $(ProcDumpPath)procdump.exe artifacts/dumps/ (Get-Date).AddMinutes(160) dotnet
displayName: Start background dump collection
- ${{ if eq(parameters.installNodeJs, 'true') }}:
- task: NodeTool@0
displayName: Install Node 18.x
inputs:
versionSpec: 18.x
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}:
- powershell: |
Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(Build.SourcesDirectory)\artifacts\tmp\selenium\"
./eng/scripts/InstallGoogleChrome.ps1
displayName: Install Chrome
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- powershell: Write-Host "##vso[task.prependpath]$(DOTNET_CLI_HOME)\.dotnet\tools"
displayName: Add dotnet tools to path
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: echo "##vso[task.prependpath]$(DOTNET_CLI_HOME)/.dotnet/tools"
displayName: Add dotnet tools to path
- ${{ parameters.beforeBuild }}
# Add COMPlus_* environment variables to build steps.
- ${{ if ne(parameters.steps, '')}}:
- ${{ each step in parameters.steps }}:
# Include all properties e.g. `task: CmdLine@2` or `displayName: Build x64` _except_ a provided `env:`.
# Aim here is to avoid having two `env:` properties in the expanded YAML.
- ${{ each pair in step }}:
${{ if ne(pair.key, 'env') }}:
${{ pair.key }}: ${{ pair.value }}
env:
# Include the variables we always want.
COMPlus_DbgEnableMiniDump: 1
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"
# Expand provided `env:` properties, if any.
${{ if step.env }}:
${{ step.env }}
- ${{ if eq(parameters.steps, '')}}:
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- script: $(BuildDirectory)\build.cmd -ci -nativeToolsOnMachine -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs)
/p:DotNetSignType=$(_SignType)
displayName: Run build.cmd
env:
COMPlus_DbgEnableMiniDump: 1
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: $(BuildDirectory)/build.sh --ci --nobl --configuration $(BuildConfiguration) $(BuildScriptArgs)
displayName: Run build.sh
env:
COMPlus_DbgEnableMiniDump: 1
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"
- ${{ parameters.afterBuild }}
- ${{ if eq(parameters.agentOs, 'Linux') }}:
- script: df -h && du -h --threshold=50MB ..
displayName: Disk utilization
- ${{ if eq(parameters.agentOs, 'macOS') }}:
- script: df -h && du -h -d 3 ..
displayName: Disk utilization
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}:
- powershell: ./eng/scripts/FinishDumpCollectionForHangingBuilds.ps1 artifacts/dumps/
displayName: Finish background dump collection
continueOnError: true
condition: always()
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- powershell: eng\scripts\KillProcesses.ps1
displayName: Kill processes
continueOnError: true
condition: always()
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: eng/scripts/KillProcesses.sh
displayName: Kill processes
continueOnError: true
condition: always()
- ${{ each artifact in parameters.artifacts }}:
- task: PublishBuildArtifacts@1
displayName: Upload artifacts from ${{ artifact.path }}
condition: and(or(succeeded(), eq('${{ artifact.publishOnError }}', 'true')), or(eq(variables['system.pullrequest.isfork'], false), eq('${{ artifact.includeForks }}', 'true')))
continueOnError: true
inputs:
# Assume runtime variable values are absolute paths already.
${{ if startsWith(artifact.path, '$(') }}:
pathToPublish: ${{ artifact.path }}
${{ if not(startsWith(artifact.path, '$(')) }}:
pathToPublish: $(Build.SourcesDirectory)/${{ artifact.path }}
${{ if eq(artifact.name, '') }}:
artifactName: artifacts-$(AgentOsName)-$(BuildConfiguration)
${{ if ne(artifact.name, '') }}:
artifactName: ${{ artifact.name }}
artifactType: Container
parallel: true
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- powershell: $(Build.SourcesDirectory)/eng/scripts/UploadCores.ps1 -ProcDumpOutputPath artifacts/dumps/
condition: failed()
displayName: Upload cores
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: $(Build.SourcesDirectory)/eng/scripts/upload-cores.sh
condition: failed()
displayName: Upload cores
- ${{ if and(eq(parameters.isAzDOTestingJob, true), ne(parameters.enablePublishTestResults, false)) }}:
- task: PublishTestResults@2
displayName: Publish js test results
condition: always()
inputs:
testResultsFormat: JUnit
testResultsFiles: '**/artifacts/log/**/*.junit.xml'
testRunTitle: $(AgentOsName)-$(BuildConfiguration)-js
mergeTestResults: true
buildConfiguration: $(BuildConfiguration)
buildPlatform: $(AgentOsName)
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- template: /eng/common/templates-official/job/job.yml@self
parameters:
name: ${{ coalesce(parameters.jobName, parameters.agentOs) }}
displayName: ${{ coalesce(parameters.jobDisplayName, parameters.agentOs) }}
dependsOn: ${{ parameters.dependsOn }}
${{ if ne(parameters.condition, '') }}:
condition: ${{ parameters.condition }}
${{ if ne(parameters.enableRichCodeNavigation, '') }}:
enableRichCodeNavigation: true
richCodeNavigationLanguage: 'csharp,typescript,java'
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }}
${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }}:
enableMicrobuild: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
${{ if and(eq(parameters.isAzDOTestingJob, true), ne(parameters.enablePublishTestResults, false)) }}:
enablePublishTestResults: true
testResultsFormat: xUnit # Have no vsTest results in any job.
mergeTestResults: true
testRunTitle: ${{ parameters.testRunTitle }}
enableSbom: ${{ parameters.enableSbom }}
enableTelemetry: true
helixRepo: dotnet/aspnetcore
helixType: build.product/
workspace:
clean: all
# Map friendly OS names to the right queue
# See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md
pool:
${{ if eq(parameters.agentOs, 'macOS') }}:
name: Azure Pipelines
image: macOS-13
os: macOS
${{ if eq(parameters.agentOs, 'Linux') }}:
name: $(DncEngInternalBuildPool)
image: 1es-ubuntu-2004
os: linux
${{ if eq(parameters.agentOs, 'Windows') }}:
name: $(DncEngInternalBuildPool)
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
image: windows.vs2022preview.amd64
os: windows
${{ if ne(parameters.container, '') }}:
container: ${{ parameters.container }}
${{ if ne(parameters.disableComponentGovernance, '') }}:
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
variables:
- AgentOsName: ${{ parameters.agentOs }}
- ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping
- BuildScriptArgs: ${{ parameters.buildArgs }}
- _BuildConfig: ${{ parameters.configuration }}
- BuildConfiguration: ${{ parameters.configuration }}
- BuildDirectory: ${{ parameters.buildDirectory }}
- DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- TeamName: AspNetCore
- ${{ if eq(parameters.codeSign, true) }}:
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
- _SignType: real
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- _SignType: test
- LC_ALL: 'en_US.UTF-8'
- LANG: 'en_US.UTF-8'
- LANGUAGE: 'en_US.UTF-8'
# Log environment variables in binary logs to ease debugging
- MSBUILDLOGALLENVIRONMENTVARIABLES: true
# Rely on task Arcade injects, not auto-injected build step.
- skipComponentGovernanceDetection: true
- ${{ each variable in parameters.variables }}:
# handle a variable list using "name" and "value" properties
# example:
# - name: [key]
# value: [value]
- ${{ if ne(variable.name, '') }}:
- name: ${{ variable.name }}
value: ${{ variable.value }}
# handle variable groups
- ${{ if ne(variable.group, '') }}:
- group: ${{ variable.group }}
# handle name/value pairs (converting them into variable list entries)
# example:
# - [name]: [value]
- ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}:
- ${{ each pair in variable }}:
- name: ${{ pair.key }}
value: ${{ pair.value }}
steps:
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: df -h
displayName: Disk size
- ${{ if eq(parameters.agentOs, 'macOS') }}:
- script: sudo xcode-select -s /Applications/Xcode_15.2.0.app/Contents/Developer
displayName: Use XCode 15.2.0
- checkout: self
clean: true
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}:
- powershell: ./eng/scripts/InstallProcDump.ps1
displayName: Install ProcDump
- powershell: ./eng/scripts/StartDumpCollectionForHangingBuilds.ps1 $(ProcDumpPath)procdump.exe artifacts/dumps/ (Get-Date).AddMinutes(160) dotnet
displayName: Start background dump collection
- ${{ if eq(parameters.installNodeJs, 'true') }}:
- task: NodeTool@0
displayName: Install Node 18.x
inputs:
versionSpec: 18.x
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}:
- powershell: |
Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(Build.SourcesDirectory)\artifacts\tmp\selenium\"
./eng/scripts/InstallGoogleChrome.ps1
displayName: Install Chrome
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- powershell: Write-Host "##vso[task.prependpath]$(DOTNET_CLI_HOME)\.dotnet\tools"
displayName: Add dotnet tools to path
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: echo "##vso[task.prependpath]$(DOTNET_CLI_HOME)/.dotnet/tools"
displayName: Add dotnet tools to path
- ${{ parameters.beforeBuild }}
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- task: PowerShell@2
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
# Populates internal runtime SAS tokens.
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
parameters:
expiryInHours: 2
# Populate dotnetbuilds-internal base64 sas tokens.
- template: /eng/common/templates-official/steps/get-delegation-sas.yml
parameters:
federatedServiceConnection: 'dotnetbuilds-internal-read'
outputVariableName: 'dotnetbuilds-internal-container-read-token'
expiryInHours: 2
base64Encode: false
storageAccount: dotnetbuilds
container: internal
permissions: rl
# Add COMPlus_* environment variables to build steps.
- ${{ if ne(parameters.steps, '')}}:
- ${{ each step in parameters.steps }}:
# Include all properties e.g. `task: CmdLine@2` or `displayName: Build x64` _except_ a provided `env:`.
# Aim here is to avoid having two `env:` properties in the expanded YAML.
- ${{ each pair in step }}:
${{ if ne(pair.key, 'env') }}:
${{ pair.key }}: ${{ pair.value }}
env:
# Include the variables we always want.
COMPlus_DbgEnableMiniDump: 1
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
# Expand provided `env:` properties, if any.
${{ if step.env }}:
${{ step.env }}
- ${{ if eq(parameters.steps, '')}}:
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- script: $(BuildDirectory)\build.cmd -ci -nativeToolsOnMachine -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs)
/p:DotNetSignType=$(_SignType)
displayName: Run build.cmd
env:
COMPlus_DbgEnableMiniDump: 1
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: $(BuildDirectory)/build.sh --ci --nobl --configuration $(BuildConfiguration) $(BuildScriptArgs)
displayName: Run build.sh
env:
COMPlus_DbgEnableMiniDump: 1
COMPlus_DbgMiniDumpName: "$(System.DefaultWorkingDirectory)/dotnet-%d.%t.core"
DotNetBuildsInternalReadSasToken: $(dotnetbuilds-internal-container-read-token)
- ${{ parameters.afterBuild }}
- ${{ if eq(parameters.agentOs, 'Linux') }}:
- script: df -h && du -h --threshold=50MB ..
displayName: Disk utilization
- ${{ if eq(parameters.agentOs, 'macOS') }}:
- script: df -h && du -h -d 3 ..
displayName: Disk utilization
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}:
- powershell: ./eng/scripts/FinishDumpCollectionForHangingBuilds.ps1 artifacts/dumps/
displayName: Finish background dump collection
continueOnError: true
condition: always()
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- powershell: eng\scripts\KillProcesses.ps1
displayName: Kill processes
continueOnError: true
condition: always()
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: eng/scripts/KillProcesses.sh
displayName: Kill processes
continueOnError: true
condition: always()
- ${{ each artifact in parameters.artifacts }}:
- task: 1ES.PublishPipelineArtifact@1
displayName: Upload artifacts from ${{ artifact.path }}
condition: and(or(succeeded(), eq('${{ artifact.publishOnError }}', 'true')), or(eq(variables['system.pullrequest.isfork'], false), eq('${{ artifact.includeForks }}', 'true')))
continueOnError: true
inputs:
# Assume runtime variable values are absolute paths already.
${{ if startsWith(artifact.path, '$(') }}:
path: ${{ artifact.path }}
${{ if not(startsWith(artifact.path, '$(')) }}:
path: $(Build.SourcesDirectory)/${{ artifact.path }}
${{ if eq(artifact.name, '') }}:
artifactName: artifacts-$(AgentOsName)-$(BuildConfiguration)
${{ if ne(artifact.name, '') }}:
artifactName: ${{ artifact.name }}
artifactType: Container
parallel: true
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- powershell: $(Build.SourcesDirectory)/eng/scripts/UploadCores.ps1 -ProcDumpOutputPath artifacts/dumps/
condition: failed()
displayName: Upload cores
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: $(Build.SourcesDirectory)/eng/scripts/upload-cores.sh
condition: failed()
displayName: Upload cores
- ${{ if and(eq(parameters.isAzDOTestingJob, true), ne(parameters.enablePublishTestResults, false)) }}:
- task: PublishTestResults@2
displayName: Publish js test results
condition: always()
inputs:
testResultsFormat: JUnit
testResultsFiles: '**/artifacts/log/**/*.junit.xml'
testRunTitle: $(AgentOsName)-$(BuildConfiguration)-js
mergeTestResults: true
buildConfiguration: $(BuildConfiguration)
buildPlatform: $(AgentOsName)