Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Azure Pipeline to Test Recent JDKs #622

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions pull-request-pipeline-parameterized.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
jobs:
- ${{ each imageName in parameters.imageName }}:
- ${{ each jdkVersion in parameters.jdkVersion }}:
- job:

displayName: ${{imageName}}_${{jdkVersion}}

pool:
vmImage: ${{imageName}}

variables:
currentImage: ${{imageName}}
codecov: $(CODECOV_TOKEN)
VERSION:

steps:
# Runs 'mvn clean package'
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '${{jdkVersion}}'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'

- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '${{jdkVersion}}'
jdkArchitectureOption: 'x64'
options: '-pl org.hl7.fhir.validation.cli'
publishJUnitResults: false
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'exec:exec'

# Upload test results to codecov
- script: bash <(curl https://codecov.io/bash) -t $(codecov)
displayName: 'codecov Bash Uploader'
condition: eq(variables.currentImage, 'ubuntu-latest')

# Publishes the test results to build artifacts.
- task: PublishCodeCoverageResults@1
displayName: 'Publish JaCoCo test results'
condition: eq(variables.currentImage, 'ubuntu-latest')
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/'
62 changes: 5 additions & 57 deletions pull-request-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,8 @@ pr:
- master
- release

# Different users have different machine setups, we run the build three times, on ubuntu, osx, and windows
strategy:
matrix:
linux:
imageName: 'ubuntu-latest'
mac:
imageName: "macos-latest"
windows:
imageName: "windows-2019"
maxParallel: 3
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add this back in? If so should it be set to 6?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these appear to be covered in the imageName bracketed arguments above? is that not the case?

Copy link
Author

@radamson radamson Oct 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I meant maxParallel specifically. The imageNames are covered.

Without maxParallel more than 3 jobs will run simultaneously. As I type 7 of the 9 jobs are running (2 have already failed)


pool:
vmImage: $(imageName)

variables:
currentImage: $(imageName)
codecov: $(CODECOV_TOKEN)
VERSION:

steps:
# Runs 'mvn clean package'
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'

- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
options: '-pl org.hl7.fhir.validation.cli'
publishJUnitResults: false
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'exec:exec'

# Upload test results to codecov
- script: bash <(curl https://codecov.io/bash) -t $(codecov)
displayName: 'codecov Bash Uploader'
condition: eq(variables.currentImage, 'ubuntu-latest')

# Publishes the test results to build artifacts.
- task: PublishCodeCoverageResults@1
displayName: 'Publish JaCoCo test results'
condition: eq(variables.currentImage, 'ubuntu-latest')
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/'
jobs:
- template: pull-request-pipeline-parameterized.yml
parameters:
imageName: [ 'ubuntu-latest', 'macos-latest', 'windows-2019' ]
jdkVersion: [ '1.8', '1.11']
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add JDK 17 support? It's the most recent LTS version of Java.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add it in, yes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JDK 17 appears to work with macos and windows, but ubuntu reported Failed to find the specified JDK version.