Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions eng/pipelines/azure-pipelines-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ variables:
# Use the build reason to decide whether to include helix_tests
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
- name: testVariants
value: ',_helix_tests'
value: '_pipeline_tests,_helix_tests'
- ${{ else }}:
- name: testVariants
value: ''
Expand Down Expand Up @@ -167,7 +167,8 @@ stages:
repoLogPath: $(Build.Arcade.LogsPath)
repoTestResultsPath: $(Build.Arcade.TestResultsPath)
isWindows: false
runHelixTests: ${{ contains(testVariant, 'helix') }}
runHelixTests: ${{ contains(testVariant, '_helix') }}
runPipelineTests: ${{ contains(testVariant, '_pipeline') }}

# ----------------------------------------------------------------
# This stage performs quality gates checks
Expand All @@ -188,28 +189,28 @@ stages:
runAsPublic: false
workspace:
clean: all

# ----------------------------------------------------------------
# This stage downloads the code coverage reports from the build jobs,
# merges those and validates the combined test coverage.
# ----------------------------------------------------------------
jobs:
- job: CodeCoverageReport
timeoutInMinutes: 10

pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals build.ubuntu.2004.amd64.open

preSteps:
- checkout: self
fetchDepth: 1
clean: true

steps:
- script: $(Build.SourcesDirectory)/build.sh --ci --restore
displayName: Init toolset

- template: /eng/pipelines/templates/VerifyCoverageReport.yml
parameters:
# matches what is used in the conditions for the build/test jobs
Expand Down
7 changes: 5 additions & 2 deletions eng/pipelines/templates/BuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ parameters:
- name: runHelixTests
type: boolean
default: false
- name: runPipelineTests
type: boolean
default: false

steps:
# Internal pipeline: Build with pack+sign
Expand Down Expand Up @@ -46,7 +49,7 @@ steps:
displayName: Build

# Non-helix tests are run only on the public pipeline
- ${{ if and(eq(parameters.runAsPublic, 'true'), ne(parameters.runHelixTests, 'true')) }}:
- ${{ if and(eq(parameters.runAsPublic, 'true'), eq(parameters.runPipelineTests, 'true')) }}:
# non-helix tests
- ${{ if ne(parameters.isWindows, 'true') }}:
- script: mkdir ${{ parameters.repoArtifactsPath }}/devcert-scripts &&
Expand Down Expand Up @@ -130,7 +133,7 @@ steps:
condition: always()

# Code coverage - only on public pipelines
- ${{ if eq(parameters.runAsPublic, 'true') }}:
- ${{ if and(eq(parameters.runAsPublic, 'true'), or(eq(parameters.runHelixTests, 'true'), eq(parameters.runPipelineTests, 'true'))) }}:
- task: CopyFiles@2
inputs:
Contents: '${{ parameters.repoArtifactsPath }}/**/*.cobertura.xml'
Expand Down