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}}
|
2023-04-12 11:46:11 -04:00
|
|
|
skipJaCoCo: $[not(eq(variables['currentName'], 'ubuntu-latest-java-11'))]
|
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-04-12 11:46:11 -04:00
|
|
|
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Djacoco.skip=$(skipJaCoCo)'
|
2023-04-04 21:09:48 -04:00
|
|
|
mavenOptions: '-Xmx768m -Dmaven.resolver.transport=wagon'
|
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-04-04 21:09:48 -04:00
|
|
|
mavenOptions: '-Xmx768m -Dmaven.resolver.transport=wagon'
|
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'
|
2023-04-12 11:46:11 -04:00
|
|
|
condition: eq(variables.skipJaCoCo, false)
|
2023-02-24 09:23:45 -05:00
|
|
|
|
|
|
|
# Publishes the test results to build artifacts.
|
|
|
|
- task: PublishCodeCoverageResults@1
|
|
|
|
displayName: 'Publish JaCoCo test results'
|
2023-04-12 11:46:11 -04:00
|
|
|
condition: eq(variables.skipJaCoCo, false)
|
2023-02-24 09:23:45 -05:00
|
|
|
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/'
|
|
|
|
|