2019-09-26 16:11:15 -04:00
# HAPI FHIR Build Pipeline
2019-09-24 14:38:38 -04:00
variables :
MAVEN_CACHE_FOLDER : $(Pipeline.Workspace)/.m2/repository
2020-01-20 16:09:06 -05:00
#MAVEN_CACHE_FOLDER: $(Agent.TempDirectory)/.m2/repository
#MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
MAVEN_OPTS : ''
2019-09-24 14:38:38 -04:00
trigger :
- master
pool :
vmImage : 'ubuntu-latest'
jobs :
- job : Build
timeoutInMinutes : 360
2019-11-23 13:51:02 -05:00
container : maven:3-jdk-11
2019-09-24 14:38:38 -04:00
steps :
2020-01-20 16:09:06 -05:00
- task : Cache@2
2019-09-24 14:38:38 -04:00
inputs :
2020-01-25 17:48:26 -05:00
key : 'maven | "$(Agent.OS)" | ./pom.xml'
2019-09-24 14:38:38 -04:00
path : $(MAVEN_CACHE_FOLDER)
2020-01-20 16:09:06 -05:00
- task : Bash@3
inputs :
targetType : 'inline'
script : mkdir -p $(MAVEN_CACHE_FOLDER); pwd; ls -al $(MAVEN_CACHE_FOLDER)
2020-06-25 16:00:59 -04:00
# - task: Maven@3
#env:
# JAVA_HOME_11_X64: /usr/local/openjdk-11
# inputs:
# goals: 'dependency:go-offline'
# # These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy
# options: '-P ALLMODULES,JACOCO,CI,ERRORPRONE -e -B -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
# # These are JVM options (and don't show up in the build logs)
# mavenOptions: '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto'
# jdkVersionOption: 1.11
2019-09-24 14:38:38 -04:00
- task : Maven@3
2019-11-23 13:51:02 -05:00
env :
JAVA_HOME_11_X64 : /usr/local/openjdk-11
2019-09-24 14:38:38 -04:00
inputs :
2020-01-20 16:09:06 -05:00
goals : 'clean install'
2019-09-26 16:11:15 -04:00
# These are Maven CLI options (and show up in the build logs) - "-nsu"=Don't update snapshots. We can remove this when Maven OSS is more healthy
2020-06-25 16:00:59 -04:00
options : '-P ALLMODULES,JACOCO,CI,ERRORPRONE -e -B #-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
2019-09-26 16:11:15 -04:00
# These are JVM options (and don't show up in the build logs)
2020-05-20 19:43:55 -04:00
mavenOptions : '-Xmx1024m $(MAVEN_OPTS) -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Duser.timezone=America/Toronto'
2019-11-23 13:51:02 -05:00
jdkVersionOption : 1.11
2019-09-25 20:15:21 -04:00
- script : bash <(curl https://codecov.io/bash) -t $(CODECOV_TOKEN)
displayName : 'codecov'
2019-10-03 07:19:00 -04:00
- task : PublishCodeCoverageResults@1
inputs :
codeCoverageTool : 'JaCoCo'
summaryFileLocation : $(System.DefaultWorkingDirectory)/hapi-fhir-jacoco/target/site/jacoco-report/jacoco.xml
reportDirectory : $(System.DefaultWorkingDirectory)/hapi-fhir-jacoco/target/site/jacoco-report/
failIfCoverageEmpty : false
2019-09-24 14:38:38 -04:00
2019-09-26 16:11:15 -04:00
# Potential Additional Maven3 Options:
#publishJUnitResults: true
#testResultsFiles: '**/surefire-reports/TEST-*.xml' # Required when publishJUnitResults == True
#testRunTitle: # Optional
#codeCoverageToolOption: 'None' # Optional. Options: none, cobertura, jaCoCo. Enabling code coverage inserts the `clean` goal into the Maven goals list when Maven runs.
#codeCoverageClassFilter: # Optional. Comma-separated list of filters to include or exclude classes from collecting code coverage. For example: +:com.*,+:org.*,-:my.app*.*
#codeCoverageClassFilesDirectories: # Optional
#codeCoverageSourceDirectories: # Optional
#codeCoverageFailIfEmpty: false # Optional
#javaHomeOption: 'JDKVersion' # Options: jDKVersion, path
#jdkVersionOption: 'default' # Optional. Options: default, 1.11, 1.10, 1.9, 1.8, 1.7, 1.6
#jdkDirectory: # Required when javaHomeOption == Path
#jdkArchitectureOption: 'x64' # Optional. Options: x86, x64
#mavenVersionOption: 'Default' # Options: default, path
#mavenDirectory: # Required when mavenVersionOption == Path
#mavenSetM2Home: false # Required when mavenVersionOption == Path
#mavenAuthenticateFeed: false
#effectivePomSkip: false
#sonarQubeRunAnalysis: false
#sqMavenPluginVersionChoice: 'latest' # Required when sonarQubeRunAnalysis == True# Options: latest, pom
#checkStyleRunAnalysis: false # Optional
#pmdRunAnalysis: false # Optional
#findBugsRunAnalysis: false # Optional
2019-10-15 20:27:53 -04:00