2019-09-26 16:11:15 -04:00
# HAPI FHIR Build Pipeline
2019-09-24 14:38:38 -04:00
variables :
2022-04-10 15:54:27 -04:00
MAVEN_CACHE_FOLDER : $(Pipeline.Workspace)/.m2/repository
#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 :
2022-04-10 15:54:27 -04:00
- master
2019-09-24 14:38:38 -04:00
pool :
2022-04-10 15:54:27 -04:00
vmImage : 'ubuntu-latest'
2019-09-24 14:38:38 -04:00
jobs :
2022-04-10 15:54:27 -04:00
- job : Build
timeoutInMinutes : 360
container : maven:3.8-openjdk-17
steps :
- task : Cache@2
inputs :
key : 'maven | "$(Agent.OS)" | ./pom.xml'
path : $(MAVEN_CACHE_FOLDER)
- task : Maven@3
env :
JAVA_HOME_11_X64 : /usr/java/openjdk-17
displayName : Checkstyle Build
inputs :
mavenPomFile : 'hapi-fhir-checkstyle/pom.xml'
goals : 'clean install'
options : '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
jdkVersionOption : 1.11
- task : DockerInstaller@0
displayName : Docker Installer
inputs :
dockerVersion : 17.09 .0 -ce
releaseType : stable
- task : Bash@3
inputs :
targetType : 'inline'
script : mkdir -p $(MAVEN_CACHE_FOLDER); pwd; ls -al $(MAVEN_CACHE_FOLDER)
- task : Maven@3
env :
JAVA_HOME_11_X64 : /usr/java/openjdk-17
inputs :
goals : 'clean install'
# 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) -Dmaven.wagon.http.pool=false -Dhttp.keepAlive=false -Dstyle.color=always -Djansi.force=true'
# 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
- task : CopyFiles@2
condition : always()
inputs :
sourceFolder : '$(System.DefaultWorkingDirectory)/'
contents : '**/target/*-reports/*.txt'
targetFolder : '$(Build.ArtifactStagingDirectory)'
- task : PublishPipelineArtifact@1
displayName : 'Publish Full Test Output'
condition : always()
inputs :
targetPath : '$(Build.ArtifactStagingDirectory)/'
artifactName : 'full_logs.zip'
- script : bash <(curl https://codecov.io/bash) -t $(CODECOV_TOKEN)
displayName : 'codecov'
- task : PublishTestResults@2
inputs :
testResultsFormat : 'JUnit'
testResultsFiles : '**/TEST-*.xml'
- 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