Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
# File for Azure Piplelines CI Builds
trigger:
- master
pr:
- master
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-latest'
variables:
osName: Linux
strategy:
matrix:
Java 8:
java.version: '1.8'
Java 11:
java.version: '1.11'
steps:
# Build using a Gradle wrapper script
- task: Gradle@2
displayName: Build + Test
inputs:
gradleWrapperFile: 'jhdf/gradlew'
workingDirectory: jhdf
tasks: 'clean build jacocoTestReport'
publishJUnitResults: true
testResultsFiles: 'jhdf/build/test-results/test/TEST-*.xml'
testRunTitle: $(osName) $(Agent.JobName)
jdkVersionOption: $(java.version)
# Publish JaCoCo code coverage results
- task: PublishCodeCoverageResults@1
displayName: Publish Code Coverage
inputs:
codeCoverageTool: 'jaCoCo' # Options: cobertura, jaCoCo
summaryFileLocation: jhdf/build/reports/jacoco/test/*.xml
reportDirectory: jhdf/build/reports/jacoco/test/html
# Source + JavaDoc
- task: Gradle@2
displayName: Build Sources + JavaDoc Jars
inputs:
gradleWrapperFile: 'jhdf/gradlew'
workingDirectory: jhdf
tasks: 'sourcesJar javadocJar'
jdkVersionOption: $(java.version)
publishJUnitResults: false
# SonarQube
- task: Gradle@2
# Only run for Java 1.8 and not for PR
condition: and(eq(variables['java.version'], '1.11'), ne(variables['Build.Reason'], 'PullRequest'))
displayName: SonarQube
inputs:
gradleWrapperFile: 'jhdf/gradlew'
workingDirectory: jhdf
tasks: 'sonarqube'
jdkVersionOption: $(java.version)
publishJUnitResults: false
gradleOptions: '-Dsonar.login=$(sonar.login)'
# SonarQube for Pull requests
- task: Gradle@2
# Only run for Java 1.8 and PR
condition: and(eq(variables['java.version'], '1.11'), eq(variables['Build.Reason'], 'PullRequest'))
displayName: SonarQube PR
inputs:
gradleWrapperFile: 'jhdf/gradlew'
workingDirectory: jhdf
tasks: 'sonarqube'
jdkVersionOption: $(java.version)
publishJUnitResults: false
gradleOptions: '-Dsonar.login=$(sonar.login)
-Dsonar.pullrequest.branch=$(Build.SourceBranch)
-Dsonar.pullrequest.key=$(System.PullRequest.PullRequestNumber)
-Dsonar.pullrequest.base=$(System.PullRequest.TargetBranch)
-Dsonar.pullrequest.github.repository=$(Build.Repository.Uri)'
- job: Windows
pool:
vmImage: 'windows-latest'
variables:
osName: Windows
strategy:
matrix:
Java 8:
java.version: '1.8'
Java 11:
java.version: '1.11'
steps:
# Build using a Gradle wrapper script
- task: Gradle@2
displayName: Build/Test
inputs:
gradleWrapperFile: 'jhdf/gradlew'
workingDirectory: jhdf
tasks: 'build'
publishJUnitResults: true
testResultsFiles: 'jhdf/build/test-results/test/TEST-*.xml'
testRunTitle: $(osName) $(Agent.JobName)
jdkVersionOption: $(java.version)
# Source + JavaDoc
- task: Gradle@2
displayName: Build Sources + JavaDoc Jars
inputs:
gradleWrapperFile: 'jhdf/gradlew'
workingDirectory: jhdf
tasks: 'sourcesJar javadocJar'
jdkVersionOption: $(java.version)
publishJUnitResults: false
- job: Mac
pool:
vmImage: 'macOS-latest'
variables:
osName: Mac
strategy:
matrix:
Java 8:
java.version: '1.8'
Java 11:
java.version: '1.11'
steps:
# Build using a Gradle wrapper script
- task: Gradle@2
displayName: Build/Test
inputs:
gradleWrapperFile: 'jhdf/gradlew'
workingDirectory: jhdf
tasks: 'build'
publishJUnitResults: true
testResultsFiles: 'jhdf/build/test-results/test/TEST-*.xml'
testRunTitle: $(osName) $(Agent.JobName)
jdkVersionOption: $(java.version)
# Source + JavaDoc
- task: Gradle@2
displayName: Build Sources + JavaDoc Jars
inputs:
gradleWrapperFile: 'jhdf/gradlew'
workingDirectory: jhdf
tasks: 'sourcesJar javadocJar'
jdkVersionOption: $(java.version)
publishJUnitResults: false