2021-11-10 14:18:55 -05:00
|
|
|
jobs:
|
2021-11-16 09:26:53 -05:00
|
|
|
- ${{ each image in parameters.images }}:
|
2021-11-10 14:18:55 -05:00
|
|
|
- job:
|
2023-02-24 09:23:45 -05:00
|
|
|
dependsOn: [ 'setup' ]
|
2022-09-23 10:38:10 -04:00
|
|
|
displayName: ${{image.displayName}}
|
2021-11-10 14:18:55 -05:00
|
|
|
|
|
|
|
pool:
|
2022-09-23 10:38:10 -04:00
|
|
|
vmImage: ${{image.vmImage}}
|
2021-11-10 14:18:55 -05:00
|
|
|
|
|
|
|
variables:
|
2022-09-23 10:38:10 -04:00
|
|
|
currentImage: ${{image.vmImage}}
|
2023-02-24 09:23:45 -05:00
|
|
|
currentName: ${{image.displayName}}
|
2021-11-10 14:18:55 -05:00
|
|
|
codecov: $(CODECOV_TOKEN)
|
|
|
|
VERSION:
|
2022-09-23 10:38:10 -04:00
|
|
|
JAVA_TOOL_OPTIONS: ${{image.javaToolOptions}}
|
2021-11-10 14:18:55 -05:00
|
|
|
|
|
|
|
steps:
|
2023-02-24 09:23:45 -05:00
|
|
|
- task: Cache@2
|
|
|
|
inputs:
|
|
|
|
key: maven | $(Build.BuildId)
|
|
|
|
path: $(MAVEN_CACHE_FOLDER)
|
2023-02-24 22:11:43 -05:00
|
|
|
# Runs 'mvn install'
|
2021-11-10 14:18:55 -05:00
|
|
|
- task: Maven@3
|
|
|
|
inputs:
|
|
|
|
mavenPomFile: 'pom.xml'
|
2023-02-24 22:11:43 -05:00
|
|
|
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
|
2023-03-17 14:06:42 -04:00
|
|
|
mavenOptions: '-Xmx4096m'
|
2021-11-10 14:18:55 -05:00
|
|
|
javaHomeOption: 'JDKVersion'
|
2022-09-23 10:38:10 -04:00
|
|
|
jdkVersionOption: '${{image.jdkVersion}}'
|
2021-11-10 14:18:55 -05:00
|
|
|
jdkArchitectureOption: 'x64'
|
|
|
|
publishJUnitResults: true
|
|
|
|
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
2023-02-24 22:11:43 -05:00
|
|
|
goals: 'install'
|
|
|
|
|
|
|
|
- task: Maven@3
|
|
|
|
inputs:
|
|
|
|
mavenPomFile: 'pom.xml'
|
2023-03-17 14:06:42 -04:00
|
|
|
mavenOptions: '-Xmx4096m'
|
2023-02-24 22:11:43 -05:00
|
|
|
javaHomeOption: 'JDKVersion'
|
|
|
|
jdkVersionOption: '${{image.jdkVersion}}'
|
|
|
|
jdkArchitectureOption: 'x64'
|
|
|
|
options: '-pl org.hl7.fhir.validation.cli -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
|
|
|
|
publishJUnitResults: false
|
|
|
|
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
|
|
|
goals: 'exec:exec'
|
2023-02-24 09:23:45 -05:00
|
|
|
|
|
|
|
# Upload test results to codecov
|
|
|
|
- script: bash <(curl https://codecov.io/bash) -t $(codecov)
|
|
|
|
displayName: 'codecov Bash Uploader'
|
|
|
|
condition: eq(variables.currentName, 'ubuntu-latest-java-11')
|
|
|
|
|
|
|
|
# Publishes the test results to build artifacts.
|
|
|
|
- task: PublishCodeCoverageResults@1
|
|
|
|
displayName: 'Publish JaCoCo test results'
|
|
|
|
condition: eq(variables.currentName, 'ubuntu-latest-java-11')
|
|
|
|
inputs:
|
|
|
|
codeCoverageTool: 'JaCoCo'
|
|
|
|
summaryFileLocation: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/jacoco.xml'
|
|
|
|
reportDirectory: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/'
|
|
|
|
|