hapi-fhir/azure-pipelines.yml

102 lines
4.3 KiB
YAML
Raw Normal View History

# 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:
Add error codes to all exceptions (#3278) * 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>
2022-01-31 16:10:15 -05:00
- 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
Replacing Hibernate Search 5 with Hibernate Search 6 (#2190) * Beginning work on converting to hibernate search 6 * replace all out of date properties * replace all POM references to old versions * remove the shaded ES jars as HS6 supports 7.9 * Convert "Bridges" to RoutingBinder and RoutingBridge * Modernize all indexing annotations * Begin refactoring of search queries (wip) * Fix spatial API changes, work on BaseTermReadSvcImpl * Most of the way through the various filter property conversions * Finished i think with BaseTermReadSvcImpl * Compiling, but definitely broken * Start test compilation failures * All tests compiling (i think) * remove suggest keywords operation * Fix bootstrap errors, still have to deal with transient fields * Rollback CR * More refactoring, got IDs baked back into docs * Fix coord util, fix a few more fields which require projection * merge fixes * begin refactor of valuesetexpansion tests * fix another test * Update tests * remove todos, add TestContainers * Fix descendant in * Add testcontainers, fix another test * fix more tests, replace embedded es * Rip out embedded elastic, replace with TestContainer * merge conflicts for new analyzers * Bump to CR2 for hibernate search 6. Add forgotten CLI dep. Add backwards compatible codecs * Remove dead deps, update testcontainer * Remove java-hamcrest * Pull asserts up, refactor tests to pass in RP tests * Update V2 check * Remove suggest keyword tests * Split line for testing * Fix perhaps one of the dumbest programming mistakes in my career so far * Refactor tests which no longer rely on a strict known order * Fix up test config, disable log test temporarily * Remove log4j from being transitively pulled in. re-enable test * Update log4j exclusions with new bridge. Update test to check for core class * Move dependency to root pom in dep management section * Update changelog, add changelog for HS6 with ES requirements. Remove dead comment * update testst, remove todos * Add hibernate props provider method, add elastic regexp query * Add todo for high level client builder * Modify ElasticsearchRestClientFactory to support HTTPS hosts * Remove protocol extraction from rest url * do we even need to index this...? * remove purge of non-indexed resources * Add longer timeout to testcontainers * Add task to add docker CLI to azure pipeline via task, for testcontainers * WIP remove this * Dont update version * Add test for duplicate termconcepts * Use real hibernate ORM methods * merge issues * Add partitionsettigns bean to match master * Trying to debug testcontainers on azure... * Trying to debug testcontainers on azure... * Run even on previous failure * Fix testcontainer port binds * Add full text logs attaching, and test reporting * I love yaml * Remove comment * Refactor delta remove to not do a once-over traversal and flatten all children pre-delete. Resolves transaction commit boundary issue * Modify TX beheaviour * wip * Rework to use config and mocked beans for partition-aware lastN * rework to not use beans and just inject vars i need for test, keps test envs cleaner * update azure pipeline to only copy test results * Remove erroneous publish * Always get test logs * Make it so indexing works, * Add todos * revert deleteByPid * Work on test fixes * Test fixes * Test fixes * Another test fix * Test fix * Work on tests * Test fixes * All tests passing locally * Fix test failure * FIx build error * Rename usages of HibernateDialectProvider -> HibernatePropertiesProvider * Update ngram of token filters * Tidying * subvert the purpose of hibernate elastic props builder to inject template * dead space * Rename changed class Co-authored-by: jamesagnew <jamesagnew@gmail.com>
2021-01-05 17:56:59 -05:00
- 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
Replacing Hibernate Search 5 with Hibernate Search 6 (#2190) * Beginning work on converting to hibernate search 6 * replace all out of date properties * replace all POM references to old versions * remove the shaded ES jars as HS6 supports 7.9 * Convert "Bridges" to RoutingBinder and RoutingBridge * Modernize all indexing annotations * Begin refactoring of search queries (wip) * Fix spatial API changes, work on BaseTermReadSvcImpl * Most of the way through the various filter property conversions * Finished i think with BaseTermReadSvcImpl * Compiling, but definitely broken * Start test compilation failures * All tests compiling (i think) * remove suggest keywords operation * Fix bootstrap errors, still have to deal with transient fields * Rollback CR * More refactoring, got IDs baked back into docs * Fix coord util, fix a few more fields which require projection * merge fixes * begin refactor of valuesetexpansion tests * fix another test * Update tests * remove todos, add TestContainers * Fix descendant in * Add testcontainers, fix another test * fix more tests, replace embedded es * Rip out embedded elastic, replace with TestContainer * merge conflicts for new analyzers * Bump to CR2 for hibernate search 6. Add forgotten CLI dep. Add backwards compatible codecs * Remove dead deps, update testcontainer * Remove java-hamcrest * Pull asserts up, refactor tests to pass in RP tests * Update V2 check * Remove suggest keyword tests * Split line for testing * Fix perhaps one of the dumbest programming mistakes in my career so far * Refactor tests which no longer rely on a strict known order * Fix up test config, disable log test temporarily * Remove log4j from being transitively pulled in. re-enable test * Update log4j exclusions with new bridge. Update test to check for core class * Move dependency to root pom in dep management section * Update changelog, add changelog for HS6 with ES requirements. Remove dead comment * update testst, remove todos * Add hibernate props provider method, add elastic regexp query * Add todo for high level client builder * Modify ElasticsearchRestClientFactory to support HTTPS hosts * Remove protocol extraction from rest url * do we even need to index this...? * remove purge of non-indexed resources * Add longer timeout to testcontainers * Add task to add docker CLI to azure pipeline via task, for testcontainers * WIP remove this * Dont update version * Add test for duplicate termconcepts * Use real hibernate ORM methods * merge issues * Add partitionsettigns bean to match master * Trying to debug testcontainers on azure... * Trying to debug testcontainers on azure... * Run even on previous failure * Fix testcontainer port binds * Add full text logs attaching, and test reporting * I love yaml * Remove comment * Refactor delta remove to not do a once-over traversal and flatten all children pre-delete. Resolves transaction commit boundary issue * Modify TX beheaviour * wip * Rework to use config and mocked beans for partition-aware lastN * rework to not use beans and just inject vars i need for test, keps test envs cleaner * update azure pipeline to only copy test results * Remove erroneous publish * Always get test logs * Make it so indexing works, * Add todos * revert deleteByPid * Work on test fixes * Test fixes * Test fixes * Another test fix * Test fix * Work on tests * Test fixes * All tests passing locally * Fix test failure * FIx build error * Rename usages of HibernateDialectProvider -> HibernatePropertiesProvider * Update ngram of token filters * Tidying * subvert the purpose of hibernate elastic props builder to inject template * dead space * Rename changed class Co-authored-by: jamesagnew <jamesagnew@gmail.com>
2021-01-05 17:56:59 -05:00
- task: CopyFiles@2
condition: always()
inputs:
sourceFolder: '$(System.DefaultWorkingDirectory)/'
2022-01-28 13:46:57 -05:00
contents: '**/target/*-reports/*.txt'
Replacing Hibernate Search 5 with Hibernate Search 6 (#2190) * Beginning work on converting to hibernate search 6 * replace all out of date properties * replace all POM references to old versions * remove the shaded ES jars as HS6 supports 7.9 * Convert "Bridges" to RoutingBinder and RoutingBridge * Modernize all indexing annotations * Begin refactoring of search queries (wip) * Fix spatial API changes, work on BaseTermReadSvcImpl * Most of the way through the various filter property conversions * Finished i think with BaseTermReadSvcImpl * Compiling, but definitely broken * Start test compilation failures * All tests compiling (i think) * remove suggest keywords operation * Fix bootstrap errors, still have to deal with transient fields * Rollback CR * More refactoring, got IDs baked back into docs * Fix coord util, fix a few more fields which require projection * merge fixes * begin refactor of valuesetexpansion tests * fix another test * Update tests * remove todos, add TestContainers * Fix descendant in * Add testcontainers, fix another test * fix more tests, replace embedded es * Rip out embedded elastic, replace with TestContainer * merge conflicts for new analyzers * Bump to CR2 for hibernate search 6. Add forgotten CLI dep. Add backwards compatible codecs * Remove dead deps, update testcontainer * Remove java-hamcrest * Pull asserts up, refactor tests to pass in RP tests * Update V2 check * Remove suggest keyword tests * Split line for testing * Fix perhaps one of the dumbest programming mistakes in my career so far * Refactor tests which no longer rely on a strict known order * Fix up test config, disable log test temporarily * Remove log4j from being transitively pulled in. re-enable test * Update log4j exclusions with new bridge. Update test to check for core class * Move dependency to root pom in dep management section * Update changelog, add changelog for HS6 with ES requirements. Remove dead comment * update testst, remove todos * Add hibernate props provider method, add elastic regexp query * Add todo for high level client builder * Modify ElasticsearchRestClientFactory to support HTTPS hosts * Remove protocol extraction from rest url * do we even need to index this...? * remove purge of non-indexed resources * Add longer timeout to testcontainers * Add task to add docker CLI to azure pipeline via task, for testcontainers * WIP remove this * Dont update version * Add test for duplicate termconcepts * Use real hibernate ORM methods * merge issues * Add partitionsettigns bean to match master * Trying to debug testcontainers on azure... * Trying to debug testcontainers on azure... * Run even on previous failure * Fix testcontainer port binds * Add full text logs attaching, and test reporting * I love yaml * Remove comment * Refactor delta remove to not do a once-over traversal and flatten all children pre-delete. Resolves transaction commit boundary issue * Modify TX beheaviour * wip * Rework to use config and mocked beans for partition-aware lastN * rework to not use beans and just inject vars i need for test, keps test envs cleaner * update azure pipeline to only copy test results * Remove erroneous publish * Always get test logs * Make it so indexing works, * Add todos * revert deleteByPid * Work on test fixes * Test fixes * Test fixes * Another test fix * Test fix * Work on tests * Test fixes * All tests passing locally * Fix test failure * FIx build error * Rename usages of HibernateDialectProvider -> HibernatePropertiesProvider * Update ngram of token filters * Tidying * subvert the purpose of hibernate elastic props builder to inject template * dead space * Rename changed class Co-authored-by: jamesagnew <jamesagnew@gmail.com>
2021-01-05 17:56:59 -05:00
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@1
displayName: 'Publish Full Test Output'
condition: always()
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/'
artifactName: 'full_logs.zip'
2021-01-23 18:50:27 -05:00
- script: bash <(curl https://codecov.io/bash) -t $(CODECOV_TOKEN)
displayName: 'codecov'
Replacing Hibernate Search 5 with Hibernate Search 6 (#2190) * Beginning work on converting to hibernate search 6 * replace all out of date properties * replace all POM references to old versions * remove the shaded ES jars as HS6 supports 7.9 * Convert "Bridges" to RoutingBinder and RoutingBridge * Modernize all indexing annotations * Begin refactoring of search queries (wip) * Fix spatial API changes, work on BaseTermReadSvcImpl * Most of the way through the various filter property conversions * Finished i think with BaseTermReadSvcImpl * Compiling, but definitely broken * Start test compilation failures * All tests compiling (i think) * remove suggest keywords operation * Fix bootstrap errors, still have to deal with transient fields * Rollback CR * More refactoring, got IDs baked back into docs * Fix coord util, fix a few more fields which require projection * merge fixes * begin refactor of valuesetexpansion tests * fix another test * Update tests * remove todos, add TestContainers * Fix descendant in * Add testcontainers, fix another test * fix more tests, replace embedded es * Rip out embedded elastic, replace with TestContainer * merge conflicts for new analyzers * Bump to CR2 for hibernate search 6. Add forgotten CLI dep. Add backwards compatible codecs * Remove dead deps, update testcontainer * Remove java-hamcrest * Pull asserts up, refactor tests to pass in RP tests * Update V2 check * Remove suggest keyword tests * Split line for testing * Fix perhaps one of the dumbest programming mistakes in my career so far * Refactor tests which no longer rely on a strict known order * Fix up test config, disable log test temporarily * Remove log4j from being transitively pulled in. re-enable test * Update log4j exclusions with new bridge. Update test to check for core class * Move dependency to root pom in dep management section * Update changelog, add changelog for HS6 with ES requirements. Remove dead comment * update testst, remove todos * Add hibernate props provider method, add elastic regexp query * Add todo for high level client builder * Modify ElasticsearchRestClientFactory to support HTTPS hosts * Remove protocol extraction from rest url * do we even need to index this...? * remove purge of non-indexed resources * Add longer timeout to testcontainers * Add task to add docker CLI to azure pipeline via task, for testcontainers * WIP remove this * Dont update version * Add test for duplicate termconcepts * Use real hibernate ORM methods * merge issues * Add partitionsettigns bean to match master * Trying to debug testcontainers on azure... * Trying to debug testcontainers on azure... * Run even on previous failure * Fix testcontainer port binds * Add full text logs attaching, and test reporting * I love yaml * Remove comment * Refactor delta remove to not do a once-over traversal and flatten all children pre-delete. Resolves transaction commit boundary issue * Modify TX beheaviour * wip * Rework to use config and mocked beans for partition-aware lastN * rework to not use beans and just inject vars i need for test, keps test envs cleaner * update azure pipeline to only copy test results * Remove erroneous publish * Always get test logs * Make it so indexing works, * Add todos * revert deleteByPid * Work on test fixes * Test fixes * Test fixes * Another test fix * Test fix * Work on tests * Test fixes * All tests passing locally * Fix test failure * FIx build error * Rename usages of HibernateDialectProvider -> HibernatePropertiesProvider * Update ngram of token filters * Tidying * subvert the purpose of hibernate elastic props builder to inject template * dead space * Rename changed class Co-authored-by: jamesagnew <jamesagnew@gmail.com>
2021-01-05 17:56:59 -05:00
- 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