mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-03-03 18:49:19 +00:00
* Initial design of adding exception codes to exceptions * Initial design of adding exception codes to exceptions * change int module name to string * add comment * shorten message * shorten message * added checkstyle * developing checker * completed checkstyle plugin and unit test for it * fix NPE * fix checker so it ignores throws on exceptions that aren't new * change parameter order in InvalidResponseException * accept Msg.code() in any parameter since some exceptions like MessageException have the message string as the second parameter * exclude generated files * BIG COMMIT added error codes to all exception throws * example test fix * Modified tests such that the assert statements would better match the message responses. * Modified additional tests such that the assert statements would better match the message responses. * fix test * merge master * merge master * Fourth commit of modified tests such that the assert statements would better match the message response * Changes made to modify assert statements such that they match the new errors which now use error codes. Also changed ResourceNotFoundException to include error codes in its messages. * Modified assert messages to better match new error codes * Time Zone changes DRAFT. Certain tests pass in intellij and fail during mvn install * Modified assert messages to better match new error codes * Added comments for time zone fixes. Previous commit comment on time zone fixes was incorrect. By invaliding caches, all tests on both intellij and mvn install passed. * Reverted changes on azure-pipelines.yml * updated hapi-fhir version for checkstyle module * changes to azure-pipelines.yml * changes to azure-pipelines.yml * change to pom.xml to include hapi-fhir-checkstyle in ALLMODULES * changes to azure-piplines (these changes are to be reverted after testing) * reverted changes to azure-piplines * reverted change where hapi-fhir-checkstyle was added to pom.xml (hapi-fhir) * Attempted fix on checkstyle build error * modified azure-piplines.yml to change maven repository for checkstyle build * Attempted fix on checkstyle build error * checkstyle config location change for hapi-depoloyable-pom. (will be reverted if it does not work) * attempted dependency add for hapi-depoloyable-pom. (will be reverted if it does not work) * reverted changes for hapi-deployable-pom * add javadoc * update last code * Attempted fix on checkstyle build error * Finished adding in missing error codes to pass Checkstyle checks * Test pipelining * Fixing errors and bumping version (as suggested by Gary) * Merge * Fixing Checkstyle error * Attempted fix for date error * Add error code onto assert statement * Add in a couple more error codes * Fixing assert statements * Bump to static version for dependency * Adding error code to message * Adding error codes to exceptions * Adding error codes to exceptions * Change to work with cdr branch * Update to faulty error message * Merge changes * allow checkstyle pom to deploy Co-authored-by: Ken Stevens <khstevens@gmail.com> Co-authored-by: Simon Zuccherato <simon.zuccherato@smilecdr.com> Co-authored-by: Predap <simon.zuccherato@gmail.com> Co-authored-by: Predap <46201929+Predap@users.noreply.github.com> Co-authored-by: Tadgh <garygrantgraham@gmail.com>
102 lines
4.3 KiB
YAML
102 lines
4.3 KiB
YAML
# HAPI FHIR Build Pipeline
|
|
|
|
variables:
|
|
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository
|
|
#MAVEN_CACHE_FOLDER: $(Agent.TempDirectory)/.m2/repository
|
|
#MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
|
|
MAVEN_OPTS: ''
|
|
|
|
trigger:
|
|
- master
|
|
|
|
pool:
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
jobs:
|
|
- job: Build
|
|
timeoutInMinutes: 360
|
|
container: maven:3.8-openjdk-17
|
|
steps:
|
|
- 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: Cache@2
|
|
inputs:
|
|
key: 'maven | "$(Agent.OS)" | ./pom.xml'
|
|
path: $(MAVEN_CACHE_FOLDER)
|
|
- 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
|
|
|
|
# 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
|
|
|
|
|