diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 011f3efd20..0471087960 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -4,6 +4,7 @@ parameters: Coverage: '' CtestRegex: .* BuildReleaseArtifacts: true + CoverageReportPath: 'sdk/*/*/*cov_xml.xml' jobs: - job: Validate @@ -119,7 +120,7 @@ jobs: # coverage report - bash: | make `cat ${{ parameters.ServiceDirectory }}-targets-coverage.txt` - ../tools/reportgenerator "-reports:sdk/*/*/*cov_xml.xml" "-targetdir:." "-reporttypes:Cobertura" + ../tools/reportgenerator "-reports:${{ parameters.CoverageReportPath }}" "-targetdir:." "-reporttypes:Cobertura" workingDirectory: build displayName: Generate Code Coverage Data condition: and(succeededOrFailed(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], '')) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-tests.yml b/eng/pipelines/templates/jobs/archetype-sdk-tests.yml index e6e46fac33..7e1ecb5bd4 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-tests.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-tests.yml @@ -14,6 +14,9 @@ parameters: - name: Coverage type: string default: 'enabled' +- name: CoverageReportPath + type: string + default: sdk/*/*/*cov_xml.xml jobs: - job: Validate @@ -93,7 +96,7 @@ jobs: # coverage report - bash: | make `cat ${{ parameters.ServiceDirectory }}-targets-coverage.txt` - ../tools/reportgenerator "-reports:sdk/*/*cov_xml.xml" "-targetdir:." "-reporttypes:Cobertura" + ../tools/reportgenerator "-reports:${{ parameters.CoverageReportPath }}" "-targetdir:." "-reporttypes:Cobertura" workingDirectory: build displayName: Generate Code Coverage Data condition: and(succeededOrFailed(), ne(variables['CODE_COVERAGE'], 'disabled'), ne(variables['CODE_COVERAGE'], '')) diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 4b5e33ab4b..88da340946 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -20,6 +20,9 @@ parameters: - name: SubscriptionConfiguration type: string default: $(sub-config-azure-cloud-test-resources) +- name: CoverageReportPath + type: string + default: 'sdk/*/*/*cov_xml.xml' stages: - stage: Build @@ -30,6 +33,7 @@ stages: Artifacts: ${{ parameters.Artifacts }} CtestRegex: ${{ parameters.CtestRegex }} Coverage: ${{ parameters.Coverage }} + CoverageReportPath: ${{ parameters.CoverageReportPath }} - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(parameters.LiveTestCtestRegex, '')) }}: - stage: LiveTest @@ -42,6 +46,7 @@ stages: CtestRegex: ${{ parameters.LiveTestCtestRegex }} Location: ${{ parameters.Location }} SubscriptionConfiguration: ${{ parameters.SubscriptionConfiguration }} + CoverageReportPath: ${{ parameters.CoverageReportPath }} - ${{ if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'), not(endsWith(variables['Build.DefinitionName'], ' - tests'))) }}: - template: archetype-cpp-release.yml diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index 0a6da03f11..23bf082c0b 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -32,7 +32,6 @@ stages: parameters: ServiceDirectory: core CtestRegex: azure-core. - LiveTestCtestRegex: azure-core. Artifacts: - Name: azure-core Path: azure-core diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 30683250b2..0d47d1997e 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -39,6 +39,7 @@ stages: CtestRegex: no-run Coverage: disabled LiveTestCtestRegex: azure-storage + CoverageReportPath: sdk/*/*cov_xml.xml SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) Artifacts: - Name: azure-storage-common diff --git a/sdk/template/ci.yml b/sdk/template/ci.yml index 45dbd1ee4b..09aa054100 100644 --- a/sdk/template/ci.yml +++ b/sdk/template/ci.yml @@ -34,7 +34,6 @@ stages: parameters: ServiceDirectory: template CtestRegex: azure-template - LiveTestCtestRegex: azure-template Artifacts: - Name: azure-template Path: azure-template