* Remove extra aspnetcore-components-e2e build tasks
- remove `isTestingJob` parameters in YAML
  - controls `PublishTestResults@2` tasks that all fail
- add comments in components-e2e and Helix jobs about "missing" `isTestingJob` parameters

nits:
- remove mention of non-existent `Windows_Templates_Test` job
- use `testResultsFormat` input name for consistency (alias of `testRunner`)

* Skip useless test publications
- add `enablePublishTestResults` parameter to default-build
  - quarantined-pr contains test jobs but all publish their tests explicitly
- do not attempt to publish TRX files

nit: simplify a YAML snippet
- `parameters.buildDirectory` is never empty (has a default)

* Eval two conditions during template expansion
- remove jobs that will never execute from UI

* Address feedback
- rename `parameters.isTestingJob` to `isAzDOTestingJob`
- remove `condition`s about `variables.DotNetFinalVersionKind`
  - variable has not been used in a _very_ long time
- document `parameters.isAzDOTestingJob` and `enablePublishTestResults`

* !fixup! Add comment for eb9e4c9ea4b9 change
- explain how to test site extension changes

* !fixup! Simplify one more expression
- missed this one in fc286da973
This commit is contained in:
Doug Bunting 2021-10-04 16:04:12 -07:00 коммит произвёл GitHub
Родитель 9c81ee0fcc
Коммит d5b3f4c541
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 49 добавлений и 41 удалений

Просмотреть файл

@ -22,7 +22,7 @@ jobs:
- template: jobs/default-build.yml
parameters:
buildDirectory: src/Components
isTestingJob: true
isAzDOTestingJob: true
agentOs: Windows
jobName: BlazorDailyTests
jobDisplayName: "Blazor Daily Tests"
@ -64,4 +64,4 @@ jobs:
artifacts:
- name: Windows_Logs
path: artifacts/log/
publishOnError: true
publishOnError: true

Просмотреть файл

@ -161,12 +161,9 @@ stages:
jobDisplayName: "Build: Windows x64/x86"
agentOs: Windows
steps:
- script: "echo ##vso[build.addbuildtag]daily-build"
condition: and(notin(variables['Build.Reason'], 'PullRequest'), notin(variables.DotNetFinalVersionKind, 'release', 'prerelease'))
displayName: 'Set CI tags'
- script: "echo ##vso[build.addbuildtag]release-candidate"
condition: and(notin(variables['Build.Reason'], 'PullRequest'), in(variables.DotNetFinalVersionKind, 'release', 'prerelease'))
displayName: 'Set CI tags'
- ${{ if notIn(variables['Build.Reason'], 'PullRequest') }}:
- script: "echo ##vso[build.addbuildtag]daily-build"
displayName: 'Set CI daily-build tag'
# !!! NOTE !!! Some of these steps have disabled code signing.
# This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even
@ -198,16 +195,17 @@ stages:
$(Windows86LogArgs)
displayName: Build x86
- script: .\src\SiteExtensions\build.cmd
-ci
-noBuildRepoTasks
-pack
-noBuildDeps
-noBuildNative
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
condition: ne(variables['Build.Reason'], 'PullRequest')
displayName: Build SiteExtension
# Submit a manual build (in public or internal project) to validate changes to site extensions.
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- script: .\src\SiteExtensions\build.cmd
-ci
-noBuildRepoTasks
-pack
-noBuildDeps
-noBuildNative
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
displayName: Build SiteExtension
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If
# https://github.com/dotnet/arcade/issues/1957 is resolved, consider running code-signing inline with the other
@ -656,7 +654,7 @@ stages:
jobName: Windows_Test
jobDisplayName: "Test: Windows Server 2016 x64"
agentOs: Windows
isTestingJob: true
isAzDOTestingJob: true
# Just uploading artifacts/logs/ files can take 15 minutes. Doubling the cancel timeout for this job.
cancelTimeoutInMinutes: 30
buildArgs: -all -pack -test /p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true
@ -682,7 +680,7 @@ stages:
jobDisplayName: "Test: macOS 10.15"
agentOs: macOS
timeoutInMinutes: 240
isTestingJob: true
isAzDOTestingJob: true
buildArgs: --all --test "/p:RunTemplateTests=false /p:SkipComponentsE2ETests=true /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs)
beforeBuild:
- bash: "./eng/scripts/install-nginx-mac.sh"
@ -702,7 +700,7 @@ stages:
jobName: Linux_Test
jobDisplayName: "Test: Ubuntu 18.04 x64"
agentOs: Linux
isTestingJob: true
isAzDOTestingJob: true
useHostedUbuntu: false
buildArgs: --all --test "/p:RunTemplateTests=false /p:SkipComponentsE2ETests=true /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs)
beforeBuild:

Просмотреть файл

@ -30,7 +30,8 @@ jobs:
jobName: Components_E2E_Test
jobDisplayName: "Test: Blazor E2E tests on Linux"
agentOs: Linux
isTestingJob: true
isAzDOTestingJob: true
enablePublishTestResults: false
steps:
- script: git submodule update --init
displayName: Update submodules

Просмотреть файл

@ -8,7 +8,7 @@ jobs:
codeSign: true
dependsOn:
- ${{ parameters.inputName }}_build
condition: and(in(variables['_SignType'], 'test', 'real'), in(dependencies.${{ parameters.inputName }}_build.result, 'Succeeded', 'SucceededWithIssues'))
condition: and(in(variables._SignType, 'test', 'real'), in(dependencies.${{ parameters.inputName }}_build.result, 'Succeeded', 'SucceededWithIssues'))
jobName: CodeSign_Xplat_${{ parameters.inputName }}
jobDisplayName: "Code-sign ${{ parameters.inputName }} packages"
agentOs: Windows

Просмотреть файл

@ -35,6 +35,11 @@
# Specifies what directory to run build.sh/cmd
# skipComponentGovernanceDetection: boolean
# Determines if component governance detection can be skipped
# 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.
#
# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details
#
@ -53,13 +58,14 @@ parameters:
codeSign: false
buildDirectory: $(System.DefaultWorkingDirectory)/eng/
skipComponentGovernanceDetection: false
isAzDOTestingJob: false
enablePublishTestResults: ''
configuration: 'Release'
container: ''
enableRichCodeNavigation: ''
installNodeJs: true
installJdk: true # Ignored unless agentOs == Windows.
isTestingJob: false
timeoutInMinutes: 180
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
useHostedUbuntu: true
@ -86,7 +92,9 @@ jobs:
enableMicrobuild: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
enablePublishTestResults: ${{ eq(parameters.isTestingJob, 'true') }} # publish test results to AzDO (populates AzDO Tests tab)
${{ 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 }}
enableTelemetry: true
@ -112,10 +120,10 @@ jobs:
${{ if eq(parameters.agentOs, 'Windows') }}:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCore1ESPool-Public
${{ if ne(parameters.isTestingJob, true) }}:
${{ if ne(parameters.isAzDOTestingJob, true) }}:
# Visual Studio Build Tools
demands: ImageOverride -equals Build.Server.Amd64.VS2019.BT.Open
${{ if eq(parameters.isTestingJob, true) }}:
${{ if eq(parameters.isAzDOTestingJob, true) }}:
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
demands: ImageOverride -equals Build.Server.Amd64.VS2019.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
@ -130,10 +138,7 @@ jobs:
- BuildScriptArgs: ${{ parameters.buildArgs }}
- _BuildConfig: ${{ parameters.configuration }}
- BuildConfiguration: ${{ parameters.configuration }}
- ${{ if eq(parameters.buildDirectory, '') }}:
- BuildDirectory: $(System.DefaultWorkingDirectory)
- ${{ if ne(parameters.buildDirectory, '') }}:
- BuildDirectory: ${{ parameters.buildDirectory }}
- BuildDirectory: ${{ parameters.buildDirectory }}
- DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- TeamName: AspNetCore
@ -162,7 +167,7 @@ jobs:
displayName: Use XCode 12.2
- checkout: self
clean: true
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isTestingJob, 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
@ -175,7 +180,7 @@ jobs:
- ${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}:
- powershell: ./eng/scripts/InstallJdk.ps1
displayName: Install JDK 11
- ${{ if eq(parameters.isTestingJob, true) }}:
- ${{ if eq(parameters.isAzDOTestingJob, true) }}:
- powershell: |
Write-Host "##vso[task.setvariable variable=SeleniumProcessTrackingFolder]$(Build.SourcesDirectory)\artifacts\tmp\selenium\"
./eng/scripts/InstallGoogleChrome.ps1
@ -227,7 +232,8 @@ jobs:
${{ step.env }}
- ${{ if eq(parameters.steps, '')}}:
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- script: $(BuildDirectory)\build.cmd -ci -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs) /p:DotNetSignType=$(_SignType)
- script: $(BuildDirectory)\build.cmd -ci -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs)
/p:DotNetSignType=$(_SignType)
displayName: Run build.cmd
env:
COMPlus_DbgEnableMiniDump: 1
@ -248,7 +254,7 @@ jobs:
- script: df -h && du -h -d 3 ..
displayName: Disk utilization
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isTestingJob, true)) }}:
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isAzDOTestingJob, true)) }}:
- powershell: ./eng/scripts/FinishDumpCollectionForHangingBuilds.ps1 artifacts/dumps/
displayName: Finish background dump collection
continueOnError: true
@ -298,12 +304,12 @@ jobs:
condition: failed()
displayName: Upload cores
- ${{ if and(eq(parameters.isTestingJob, true), ne(parameters.jobName, 'Windows_Templates_Test')) }}:
- ${{ if and(eq(parameters.isAzDOTestingJob, true), ne(parameters.enablePublishTestResults, false)) }}:
- task: PublishTestResults@2
displayName: Publish js test results
condition: always()
inputs:
testRunner: junit
testResultsFormat: JUnit
testResultsFiles: '**/artifacts/log/**/*.junit.xml'
testRunTitle: $(AgentOsName)-$(BuildConfiguration)-js
mergeTestResults: true

Просмотреть файл

@ -83,7 +83,8 @@ jobs:
jobDisplayName: 'Tests: Windows x64'
agentOs: Windows
timeoutInMinutes: 90
isTestingJob: true
isAzDOTestingJob: true
enablePublishTestResults: false
steps:
- powershell: "& ./eng/build.ps1 -CI -nobl -all -pack -NoBuildJava"
displayName: Build
@ -115,7 +116,8 @@ jobs:
jobDisplayName: "Tests: macOS 10.14"
agentOs: macOS
timeoutInMinutes: 120
isTestingJob: true
isAzDOTestingJob: true
enablePublishTestResults: false
steps:
- bash: ./eng/build.sh --all --pack --ci --nobl --no-build-java
displayName: Build
@ -147,7 +149,8 @@ jobs:
jobDisplayName: "Tests: Ubuntu 18.04 x64"
agentOs: Linux
timeoutInMinutes: 60
isTestingJob: true
isAzDOTestingJob: true
enablePublishTestResults: false
useHostedUbuntu: false
steps:
- bash: ./eng/build.sh --all --pack --ci --nobl --no-build-java

Просмотреть файл

@ -22,7 +22,7 @@ jobs:
jobName: Windows_Stress_Test
jobDisplayName: "Windows Stress test"
agentOs: Windows
isTestingJob: true
isAzDOTestingJob: true
steps:
- script: .\src\Servers\Kestrel\stress\build.cmd -ci -c Release
displayName: Build Repo