diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml
index 595aea3352e9..173f938eccef 100644
--- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml
+++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml
@@ -2,7 +2,7 @@ parameters:
ServiceDirectory: not-specified # Set a default that breaks in obvious ways.
PreTestSteps: []
TestOptions: '$(DefaultOptions)'
- TestGoals: test
+ TestGoals: verify
TestMatrix:
Linux - Java 8:
OSName: 'Linux'
@@ -274,6 +274,11 @@ jobs:
- template: ../steps/cache-maven-repository.yml
+ - template: ../steps/install-reporting-tools.yml
+ parameters:
+ Options: --batch-mode
+ MavenOptions: $(MemoryOptions) $(LoggingOptions)
+
- task: Maven@3
displayName: 'Start Jetty'
condition: ne(variables['SdkType'], 'client')
@@ -329,7 +334,7 @@ jobs:
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: ${{ parameters.TestGoals }}
- # we want to run this when TestFromSource isn't true (which covers normal running when it isn't set)
+ # we want to run this when TestFromSource isn't true (which covers normal running when it isn't set)
# OR when ShouldRunSourceTests is true
condition: and(succeeded(), or(ne(variables['TestFromSource'],'true'), eq(variables['ShouldRunSourceTests'],'true')))
@@ -338,3 +343,37 @@ jobs:
inputs:
mergeTestResults: true
testRunTitle: $(RunTitle)
+
+ # Generate JaCoCo code coverage report on Java 11, Linux builds if the build reason is not PR.
+ - task: Maven@3
+ displayName: 'Generate aggregate code coverage report'
+ condition: and(eq(variables['OsName'], 'Linux'), eq(variables['JavaVersion'], '1.11'), ne(variables['Build.Reason'], 'PullRequest'))
+ inputs:
+ # Aggregate reports for non-PR builds will use pom.client.xml and include non-shipping modules
+ mavenPomFile: pom.client.xml
+ options: '$(DefaultOptions) -Dinclude-non-shipping-modules -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true'
+ mavenOptions: '-Xmx3072m $(LoggingOptions)'
+ javaHomeOption: 'JDKVersion'
+ jdkVersionOption: $(JavaVersion)
+ jdkArchitectureOption: 'x64'
+ publishJUnitResults: false
+ goals: 'verify'
+
+ # Azure DevOps only seems to respect the last code coverage result published, so only do this for Linux + Java LTS.
+ # Code coverage reporting is setup only for Track 2 modules.
+ - task: PublishCodeCoverageResults@1
+ condition: and(eq(variables['OsName'], 'Linux'), eq(variables['JavaVersion'], '1.11'), ne(variables['Build.Reason'], 'PullRequest'))
+ inputs:
+ codeCoverageTool: JaCoCo
+ summaryFileLocation: eng/jacoco-test-coverage/target/site/test-coverage/jacoco.xml
+ reportDirectory: eng/jacoco-test-coverage/target/site/test-coverage/
+ failIfCoverageEmpty: true
+
+ # Publish code coverage to an artifact so it can be uploaded to the Maven site.
+ # Do this for track 2 modules only. Code coverage from previous step is only published for Linux + Java LTS.
+ - task: PublishPipelineArtifact@0
+ displayName: 'Publish coverage artifact'
+ condition: and(eq(variables['OsName'], 'Linux'), eq(variables['JavaVersion'], '1.11'), ne(variables['Build.Reason'], 'PullRequest'))
+ inputs:
+ artifactName: coverage
+ targetPath: eng/jacoco-test-coverage/target/site/
diff --git a/pom.client.xml b/pom.client.xml
index fb966de07912..438c163f4e4d 100644
--- a/pom.client.xml
+++ b/pom.client.xml
@@ -104,6 +104,8 @@
https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java
https://github.com/Azure/azure-sdk-for-java/issues
azure-client-sdk-parent
+ 0.40
+ 0.30
@@ -333,6 +335,31 @@
${project.reporting.outputDirectory}/test-coverage
+
+ check
+
+ check
+
+
+
+
+ BUNDLE
+
+
+ LINE
+ COVEREDRATIO
+ ${jacoco.min.linecoverage}
+
+
+ BRANCH
+ COVEREDRATIO
+ ${jacoco.min.branchcoverage}
+
+
+
+
+
+
diff --git a/sdk/storage/azure-storage-blob-cryptography/pom.xml b/sdk/storage/azure-storage-blob-cryptography/pom.xml
index 99992896009c..8d4cde29759b 100644
--- a/sdk/storage/azure-storage-blob-cryptography/pom.xml
+++ b/sdk/storage/azure-storage-blob-cryptography/pom.xml
@@ -32,6 +32,11 @@
HEAD
+
+ 0.18
+ 0.09
+
+
com.azure
diff --git a/sdk/storage/azure-storage-common/pom.xml b/sdk/storage/azure-storage-common/pom.xml
index fd21c5b3c90d..5f93fb133ba5 100644
--- a/sdk/storage/azure-storage-common/pom.xml
+++ b/sdk/storage/azure-storage-common/pom.xml
@@ -32,6 +32,11 @@
HEAD
+
+ 0.20
+ 0.18
+
+
com.azure