Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
142 lines (129 sloc) 3.91 KB
# File for Azure Piplelines CI Builds
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
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
- script: 'cd jhdf;
./gradlew sonarqube
-Dsonar.projectKey=jamesmudd_jhdf
-Dsonar.organization=jamesmudd-github
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=$(sonar.login)'
displayName: SonarQube
# Only run for Java 1.8 and not for PR
condition: and(eq(variables['java.version'], '1.8'), ne(variables['Build.Reason'], 'PullRequest'))
# SonarQube for Pull requests
- script: 'cd jhdf;
./gradlew sonarqube
-Dsonar.projectKey=jamesmudd_jhdf
-Dsonar.organization=jamesmudd-github
-Dsonar.host.url=https://sonarcloud.io
-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)'
displayName: SonarQube PR
# Only run for Java 1.8 and PR
condition: and(eq(variables['java.version'], '1.8'), eq(variables['Build.Reason'], 'PullRequest'))
- job: Windows
pool:
vmImage: 'vs2017-win2016'
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-10.13'
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
You can’t perform that action at this time.