From 1c783a5b17140814ce96ad798042764e7ab1af4c Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Fri, 8 Mar 2024 21:09:26 +1100 Subject: [PATCH 1/5] Restructure build pipeline --- azure-pipelines.yml | 446 +++++++++--------- eng/pipelines/templates/BuildAndTest.yml | 9 +- .../templates/VerifyCoverageReport.yml | 34 +- 3 files changed, 252 insertions(+), 237 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a695dd6529a..31f7a78694d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -108,229 +108,229 @@ variables: - name: _Sign value: true -stages: -- stage: build - displayName: Build - variables: - - template: /eng/common/templates/variables/pool-providers.yml - jobs: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enableTelemetry: true - enableSourceIndex: false - runAsPublic: ${{ variables['runAsPublic'] }} - # Publish build logs - enablePublishBuildArtifacts: true - # Publish test logs - enablePublishTestResults: true - # Publish NuGet packages using v3 - # https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md#basic-onboarding-scenario-for-new-repositories-to-the-current-publishing-version-v3 - enablePublishUsingPipelines: true - enablePublishBuildAssets: true - workspace: - clean: all - +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + sdl: + sourceAnalysisPool: + name: NetCore1ESPool-Internal + image: windows.vs2022preview.amd64 + os: windows + customBuildTags: + - ES365AIMigrationTooling + + stages: + - stage: build + displayName: Build + variables: + - template: /eng/common/templates-official/variables/pool-providers.yml@self jobs: - - # ---------------------------------------------------------------- - # This job build and run tests on Windows - # ---------------------------------------------------------------- - - job: Windows - timeoutInMinutes: 180 - testResultsFormat: VSTest - - pool: - ${{ if eq(variables['runAsPublic'], 'true') }}: - name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2022preview.amd64.open - # Non-public (i.e., official builds) - ${{ else }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals windows.vs2022preview.amd64 - - variables: - - _buildScript: $(Build.SourcesDirectory)/build.cmd -ci -NativeToolsOnMachine - - preSteps: - - checkout: self - clean: true - persistCredentials: true - fetchDepth: 1 - - steps: - - template: /eng/pipelines/templates/BuildAndTest.yml - parameters: - buildScript: $(_buildScript) - buildConfig: $(_BuildConfig) - repoLogPath: $(Build.Arcade.LogsPath) - repoTestResultsPath: $(Build.Arcade.TestResultsPath) - skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }} - isWindows: true - warnAsError: 0 - - # ---------------------------------------------------------------- - # This job build and run tests on Ubuntu - # ---------------------------------------------------------------- - - job: Ubuntu - timeoutInMinutes: 180 - testResultsFormat: VSTest - - pool: - ${{ if eq(variables['runAsPublic'], 'true') }}: - name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals build.ubuntu.2004.amd64.open - # Non-public (i.e., official builds) - ${{ else }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals build.ubuntu.2004.amd64 - - variables: - - _buildScript: $(Build.SourcesDirectory)/build.sh --ci - - preSteps: - - checkout: self - clean: true - persistCredentials: true - fetchDepth: 1 - - steps: - - template: /eng/pipelines/templates/BuildAndTest.yml - parameters: - buildScript: $(_buildScript) - buildConfig: $(_BuildConfig) - repoLogPath: $(Build.Arcade.LogsPath) - repoTestResultsPath: $(Build.Arcade.TestResultsPath) - skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }} - isWindows: false - warnAsError: 0 - - -# ---------------------------------------------------------------- -# This stage performs quality gates enforcements -# ---------------------------------------------------------------- -- stage: codecoverage - displayName: CodeCoverage - dependsOn: - - build - condition: and(succeeded('build'), ne(variables['SkipQualityGates'], 'true')) - variables: - - template: /eng/common/templates/variables/pool-providers.yml - jobs: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enableTelemetry: true - runAsPublic: ${{ variables['runAsPublic'] }} - workspace: - clean: all - - # ---------------------------------------------------------------- - # This stage downloads the code coverage reports from the build jobs, - # merges those and validates the combined test coverage. - # ---------------------------------------------------------------- + - template: /eng/common/templates-official/jobs/jobs.yml@self + parameters: + enableMicrobuild: true + enableTelemetry: true + enableSourceIndex: false + runAsPublic: ${{ variables['runAsPublic'] }} + # Publish build logs + enablePublishBuildArtifacts: true + # Publish test logs + enablePublishTestResults: true + # Publish NuGet packages using v3 + # https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md#basic-onboarding-scenario-for-new-repositories-to-the-current-publishing-version-v3 + enablePublishUsingPipelines: true + enablePublishBuildAssets: true + workspace: + clean: all + + jobs: + + # ---------------------------------------------------------------- + # This job build and run tests on Windows + # ---------------------------------------------------------------- + - job: Windows + timeoutInMinutes: 180 + testResultsFormat: VSTest + pool: + name: NetCore1ESPool-Internal + image: windows.vs2022preview.amd64 + os: windows + + variables: + - _buildScript: $(Build.SourcesDirectory)/build.cmd -ci -NativeToolsOnMachine + + preSteps: + - checkout: self + clean: true + persistCredentials: true + fetchDepth: 1 + + steps: + - template: /eng/pipelines/templates/BuildAndTest.yml + parameters: + buildScript: $(_buildScript) + buildConfig: $(_BuildConfig) + repoLogPath: $(Build.Arcade.LogsPath) + repoTestResultsPath: $(Build.Arcade.TestResultsPath) + skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }} + isWindows: true + warnAsError: 0 + + # ---------------------------------------------------------------- + # This job build and run tests on Ubuntu + # ---------------------------------------------------------------- + - job: Ubuntu + timeoutInMinutes: 180 + testResultsFormat: VSTest + pool: + name: NetCore1ESPool-Internal + image: 1es-mariner-2-pt + os: linux + + variables: + - _buildScript: $(Build.SourcesDirectory)/build.sh --ci + + preSteps: + - checkout: self + clean: true + persistCredentials: true + fetchDepth: 1 + + steps: + - template: /eng/pipelines/templates/BuildAndTest.yml + parameters: + buildScript: $(_buildScript) + buildConfig: $(_BuildConfig) + repoLogPath: $(Build.Arcade.LogsPath) + repoTestResultsPath: $(Build.Arcade.TestResultsPath) + skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }} + isWindows: false + warnAsError: 0 + + # ---------------------------------------------------------------- + # This stage performs quality gates enforcements + # ---------------------------------------------------------------- + - stage: codecoverage + displayName: CodeCoverage + dependsOn: + - build + condition: and(succeeded('build'), ne(variables['SkipQualityGates'], 'true')) + variables: + - template: /eng/common/templates-official/variables/pool-providers.yml@self jobs: - - job: CodeCoverageReport - timeoutInMinutes: 180 - - pool: - ${{ if eq(variables['runAsPublic'], 'true') }}: - name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals build.ubuntu.2004.amd64.open - # Non-public (i.e., official builds) - ${{ else }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals build.ubuntu.2004.amd64 - - preSteps: - - checkout: self - clean: true - persistCredentials: true - fetchDepth: 1 - - steps: - - script: $(Build.SourcesDirectory)/build.sh --ci --restore - displayName: Init toolset - - - template: /eng/pipelines/templates/VerifyCoverageReport.yml - - -# ---------------------------------------------------------------- -# This stage only performs a build treating warnings as errors -# to detect any kind of code style violations -# ---------------------------------------------------------------- -- stage: correctness - displayName: Correctness - dependsOn: [] - variables: - - template: /eng/common/templates/variables/pool-providers.yml - jobs: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enableTelemetry: true - runAsPublic: ${{ variables['runAsPublic'] }} - workspace: - clean: all - + - template: /eng/common/templates-official/jobs/jobs.yml@self + parameters: + enableMicrobuild: true + enableTelemetry: true + runAsPublic: ${{ variables['runAsPublic'] }} + 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: 180 + + pool: + name: NetCore1ESPool-Internal + image: 1es-mariner-2-pt + os: linux + + preSteps: + - checkout: self + clean: true + persistCredentials: true + fetchDepth: 1 + + steps: + - script: $(Build.SourcesDirectory)/build.sh --ci --restore + displayName: Init toolset + + - template: /eng/pipelines/templates/VerifyCoverageReport.yml + + + # ---------------------------------------------------------------- + # This stage only performs a build treating warnings as errors + # to detect any kind of code style violations + # ---------------------------------------------------------------- + - stage: correctness + displayName: Correctness + dependsOn: [] + variables: + - template: /eng/common/templates-official/variables/pool-providers.yml@self jobs: - - job: WarningsCheck - timeoutInMinutes: 180 - - pool: - ${{ if eq(variables['runAsPublic'], 'true') }}: - name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals build.ubuntu.2004.amd64.open - # Non-public (i.e., official builds) - ${{ else }}: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals build.ubuntu.2004.amd64 - - variables: - - _buildScript: $(Build.SourcesDirectory)/build.sh --ci - - preSteps: - - checkout: self - clean: true - persistCredentials: true - fetchDepth: 1 - - steps: - - template: \eng\pipelines\templates\BuildAndTest.yml - parameters: - buildScript: $(_buildScript) - buildConfig: $(_BuildConfig) - repoLogPath: $(Build.Arcade.LogsPath) - repoTestResultsPath: $(Build.Arcade.TestResultsPath) - skipTests: true - skipQualityGates: true - isWindows: false - - -# Publish and validation steps. Only run in official builds -- ${{ if and(ne(variables['runAsPublic'], 'true'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: /eng/common/templates/post-build/post-build.yml - parameters: - validateDependsOn: - - build - - codecoverage - - correctness - publishingInfraVersion: 3 - enableSymbolValidation: false - enableSigningValidation: false - enableNugetValidation: false - enableSourceLinkValidation: false - # these param values come from the DotNet-Winforms-SDLValidation-Params azdo variable group - SDLValidationParameters: - enable: false - params: ' -SourceToolsList $(_TsaSourceToolsList) - -TsaInstanceURL $(_TsaInstanceURL) - -TsaProjectName $(_TsaProjectName) - -TsaNotificationEmail $(_TsaNotificationEmail) - -TsaCodebaseAdmin $(_TsaCodebaseAdmin) - -TsaBugAreaPath $(_TsaBugAreaPath) - -TsaIterationPath $(_TsaIterationPath) - -TsaRepositoryName $(_TsaRepositoryName) - -TsaCodebaseName $(_TsaCodebaseName) - -TsaOnboard $(_TsaOnboard) - -TsaPublish $(_TsaPublish)' + - template: /eng/common/templates-official/jobs/jobs.yml@self + parameters: + enableMicrobuild: true + enableTelemetry: true + runAsPublic: ${{ variables['runAsPublic'] }} + workspace: + clean: all + + jobs: + - job: WarningsCheck + timeoutInMinutes: 180 + + pool: + ${{ if eq(variables['runAsPublic'], 'true') }}: + name: NetCore1ESPool-Internal + image: 1es-mariner-2-pt + os: linux + + variables: + - _buildScript: $(Build.SourcesDirectory)/build.sh --ci + + preSteps: + - checkout: self + clean: true + persistCredentials: true + fetchDepth: 1 + + steps: + - template: '\eng\pipelines\templates\BuildAndTest.yml' + parameters: + buildScript: $(_buildScript) + buildConfig: $(_BuildConfig) + repoLogPath: $(Build.Arcade.LogsPath) + repoTestResultsPath: $(Build.Arcade.TestResultsPath) + skipTests: true + skipQualityGates: true + isWindows: false + + + # Publish and validation steps. Only run in official builds + - ${{ if and(ne(variables['runAsPublic'], 'true'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: /eng/common/templates-official/post-build/post-build.yml@self + parameters: + validateDependsOn: + - build + - codecoverage + - correctness + publishingInfraVersion: 3 + enableSymbolValidation: false + enableSigningValidation: false + enableNugetValidation: false + enableSourceLinkValidation: false + # these param values come from the DotNet-Winforms-SDLValidation-Params azdo variable group + SDLValidationParameters: + enable: false + params: ' -SourceToolsList $(_TsaSourceToolsList) + -TsaInstanceURL $(_TsaInstanceURL) + -TsaProjectName $(_TsaProjectName) + -TsaNotificationEmail $(_TsaNotificationEmail) + -TsaCodebaseAdmin $(_TsaCodebaseAdmin) + -TsaBugAreaPath $(_TsaBugAreaPath) + -TsaIterationPath $(_TsaIterationPath) + -TsaRepositoryName $(_TsaRepositoryName) + -TsaCodebaseName $(_TsaCodebaseName) + -TsaOnboard $(_TsaOnboard) + -TsaPublish $(_TsaPublish)' diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index 6252a2c6337..02dd98a751f 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -45,7 +45,7 @@ steps: - ${{ if ne(parameters.skipTests, 'true') }}: - script: $(Build.SourcesDirectory)/.dotnet/dotnet dotnet-coverage collect --settings $(Build.SourcesDirectory)/eng/CodeCoverage.config - --output ${{ parameters.repoTestResultsPath }}/$(Agent.Os)_$(Agent.JobName).cobertura.xml + --output ${{ parameters.repoTestResultsPath }}/$(Agent.JobName)_CodeCoverageResults/$(Agent.JobName)_cobertura.xml "${{ parameters.buildScript }} -test -configuration ${{ parameters.buildConfig }} /bl:${{ parameters.repoLogPath }}/tests.binlog $(_OfficialBuildIdArgs)" displayName: Run tests @@ -66,12 +66,11 @@ steps: continueOnError: true - ${{ if ne(parameters.skipQualityGates, 'true') }}: - - task: PublishBuildArtifacts@1 + - task: 1ES.PublishPipelineArtifact@1 displayName: Publish coverage results (cobertura.xml) inputs: - PathtoPublish: '${{ parameters.repoTestResultsPath }}/$(Agent.Os)_$(Agent.JobName).cobertura.xml' - PublishLocation: Container - ArtifactName: CodeCoverageResults + targetPath: '${{ parameters.repoTestResultsPath }}/$(Agent.JobName)_CodeCoverageResults' + artifactName: "$(Agent.JobName)_CodeCoverageResults" - ${{ if eq(parameters.isWindows, 'true') }}: - script: ${{ parameters.buildScript }} diff --git a/eng/pipelines/templates/VerifyCoverageReport.yml b/eng/pipelines/templates/VerifyCoverageReport.yml index 337402dd399..89063da276b 100644 --- a/eng/pipelines/templates/VerifyCoverageReport.yml +++ b/eng/pipelines/templates/VerifyCoverageReport.yml @@ -1,18 +1,34 @@ steps: - - task: DownloadBuildArtifacts@0 - displayName: Download code coverage reports + + # This downloads Windows_cobertura.xml from Windows_CodeCoverageResults artifact to the root of the repo + - task: DownloadPipelineArtifact@2 + displayName: Download Windows code coverage reports + inputs: + buildType: 'current' + artifactName: Windows_CodeCoverageResults + itemPattern: '*_cobertura.xml' + targetPath: $(Build.SourcesDirectory) + + # This downloads Ubuntu_cobertura.xml from Ubuntu_CodeCoverageResults artifact to the root of the repo + - task: DownloadPipelineArtifact@2 + displayName: Download Ubuntu code coverage reports inputs: - artifactName: CodeCoverageResults - downloadPath: $(System.DefaultWorkingDirectory) + buildType: 'current' + artifactName: Ubuntu_CodeCoverageResults + itemPattern: '*_cobertura.xml' + targetPath: $(Build.SourcesDirectory) + + - script: tree $(Build.SourcesDirectory) + # Merge the downloaded files (Windows_cobertura.xml and Ubuntu_cobertura.xml) as one (merged.cobertura.xml) - script: $(Build.SourcesDirectory)/.dotnet/dotnet dotnet-coverage merge - $(System.DefaultWorkingDirectory)/CodeCoverageResults/*.cobertura.xml + $(Build.SourcesDirectory)/*_cobertura.xml --output-format cobertura - --output ./merged.cobertura.xml + --output $(Build.SourcesDirectory)/merged.cobertura.xml displayName: Merge code coverage reports - script: $(Build.SourcesDirectory)/.dotnet/dotnet reportgenerator - -reports:./merged.cobertura.xml + -reports:$(Build.SourcesDirectory)/merged.cobertura.xml -targetdir:./CoverageResultsHtml -reporttypes:HtmlInline_AzurePipelines displayName: Generate code coverage report @@ -23,12 +39,12 @@ steps: DISABLE_COVERAGE_AUTOGENERATE: 'true' inputs: codeCoverageTool: cobertura - summaryFileLocation: ./merged.cobertura.xml + summaryFileLocation: $(Build.SourcesDirectory)/merged.cobertura.xml pathToSources: $(Build.SourcesDirectory) reportDirectory: ./CoverageResultsHtml - pwsh: | - $(Build.SourcesDirectory)/eng/scripts/ValidateProjectCoverage.ps1 -CoberturaReportXml ./merged.cobertura.xml + $(Build.SourcesDirectory)/eng/scripts/ValidateProjectCoverage.ps1 -CoberturaReportXml $(Build.SourcesDirectory)/merged.cobertura.xml displayName: Check per-project coverage - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: From 7487688690d9895e46b9ddf93fcf80dac9d8c61f Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Wed, 13 Mar 2024 14:15:08 +1100 Subject: [PATCH 2/5] fixup! Restructure build pipeline --- eng/pipelines/templates/BuildAndTest.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index 02dd98a751f..cdd78a34c07 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -66,11 +66,20 @@ steps: continueOnError: true - ${{ if ne(parameters.skipQualityGates, 'true') }}: - - task: 1ES.PublishPipelineArtifact@1 - displayName: Publish coverage results (cobertura.xml) - inputs: - targetPath: '${{ parameters.repoTestResultsPath }}/$(Agent.JobName)_CodeCoverageResults' - artifactName: "$(Agent.JobName)_CodeCoverageResults" + - ${{ if eq(variables['runAsPublic'], 'true') }}: + - task: PublishPipelineArtifact@1 + displayName: Publish coverage results (cobertura.xml) + inputs: + targetPath: '${{ parameters.repoTestResultsPath }}/$(Agent.JobName)_CodeCoverageResults' + artifactName: "$(Agent.JobName)_CodeCoverageResults" + publishLocation: 'pipeline' + + - ${{ if eq(variables['runAsPublic'], 'false') }}: + - task: 1ES.PublishPipelineArtifact@1 + displayName: Publish coverage results (cobertura.xml) + inputs: + targetPath: '${{ parameters.repoTestResultsPath }}/$(Agent.JobName)_CodeCoverageResults' + artifactName: "$(Agent.JobName)_CodeCoverageResults" - ${{ if eq(parameters.isWindows, 'true') }}: - script: ${{ parameters.buildScript }} From 79bf952ebf05bff1ca1d2bbc14272998ea09f8e5 Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Wed, 13 Mar 2024 15:05:10 +1100 Subject: [PATCH 3/5] fixup! Restructure build pipeline --- azure-pipelines-public.yml | 2 ++ eng/pipelines/templates/BuildAndTest.yml | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-public.yml b/azure-pipelines-public.yml index fc9d13bc512..8f65cab9ff8 100644 --- a/azure-pipelines-public.yml +++ b/azure-pipelines-public.yml @@ -133,6 +133,7 @@ stages: skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }} isWindows: true warnAsError: 0 + runAsPublic: true # ---------------------------------------------------------------- # This job build and run tests on Ubuntu @@ -164,6 +165,7 @@ stages: skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }} isWindows: false warnAsError: 0 + runAsPublic: true # ---------------------------------------------------------------- diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index cdd78a34c07..80223edff66 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -18,6 +18,9 @@ parameters: - name: warnAsError type: number default: 1 + - name: runAsPublic + type: boolean + default: false steps: - script: ${{ parameters.buildScript }} @@ -66,7 +69,7 @@ steps: continueOnError: true - ${{ if ne(parameters.skipQualityGates, 'true') }}: - - ${{ if eq(variables['runAsPublic'], 'true') }}: + - ${{ if eq(parameters.runAsPublic, 'true') }}: - task: PublishPipelineArtifact@1 displayName: Publish coverage results (cobertura.xml) inputs: @@ -74,7 +77,7 @@ steps: artifactName: "$(Agent.JobName)_CodeCoverageResults" publishLocation: 'pipeline' - - ${{ if eq(variables['runAsPublic'], 'false') }}: + - ${{ if eq(parameters.runAsPublic, 'false') }}: - task: 1ES.PublishPipelineArtifact@1 displayName: Publish coverage results (cobertura.xml) inputs: From 608c484b5487b8be2059a5f90652f0c42fd54956 Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Wed, 13 Mar 2024 15:07:08 +1100 Subject: [PATCH 4/5] fixup! Restructure build pipeline --- eng/pipelines/templates/BuildAndTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index 80223edff66..ced3ce0afb3 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -77,7 +77,7 @@ steps: artifactName: "$(Agent.JobName)_CodeCoverageResults" publishLocation: 'pipeline' - - ${{ if eq(parameters.runAsPublic, 'false') }}: + - ${{ if ne(parameters.runAsPublic, 'true') }}: - task: 1ES.PublishPipelineArtifact@1 displayName: Publish coverage results (cobertura.xml) inputs: From 88188e1910d4b84bccb1b32d755a432c4e889af4 Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Wed, 13 Mar 2024 15:47:45 +1100 Subject: [PATCH 5/5] fixup! Restructure build pipeline --- eng/pipelines/templates/VerifyCoverageReport.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/eng/pipelines/templates/VerifyCoverageReport.yml b/eng/pipelines/templates/VerifyCoverageReport.yml index 89063da276b..49f34e3cd63 100644 --- a/eng/pipelines/templates/VerifyCoverageReport.yml +++ b/eng/pipelines/templates/VerifyCoverageReport.yml @@ -18,8 +18,6 @@ steps: itemPattern: '*_cobertura.xml' targetPath: $(Build.SourcesDirectory) - - script: tree $(Build.SourcesDirectory) - # Merge the downloaded files (Windows_cobertura.xml and Ubuntu_cobertura.xml) as one (merged.cobertura.xml) - script: $(Build.SourcesDirectory)/.dotnet/dotnet dotnet-coverage merge $(Build.SourcesDirectory)/*_cobertura.xml