@@ -1278,6 +1278,7 @@ commands:
12781278 # - cache-out-python-requirements
12791279 - install-maven
12801280 - install-python3-requirements
1281+ - install-xml-cli-tool
12811282 # - run: jps
12821283 # - run:
12831284 # name: Wait until EHRbase server is ready
@@ -1293,7 +1294,8 @@ commands:
12931294 echo "OAUTH_RESRCSERVER_URL: $SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUERURI"
12941295 ls -la
12951296 if [ "${SUT}" != "TEST" ]; then
1296- EHRbase_VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)
1297+
1298+ EHRbase_VERSION=$(xmlstarlet sel -t -m "/_:project/_:version" -v . pom.xml )
12971299 echo ${EHRbase_VERSION}
12981300 java -jar "application/target/application-${EHRbase_VERSION}.jar" \
12991301 --system.allow-template-overwrite=<< parameters.allow-template-overwrite >> \
@@ -1447,32 +1449,35 @@ commands:
14471449
14481450 maven-install-sdk :
14491451 steps :
1452+ - install-xml-cli-tool
14501453 - run :
14511454 name : Save the version number of locally installed SDK into a file
14521455 command : |
14531456 cd ~/projects/openEHR_SDK
1454- mvn build-helper:parse-version versions:set -DnewVersion=\${project.version}-LOCAL$(cat /proc/sys/kernel/random/uuid) versions:commit
1455- SDK_VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)
1457+ mvn build-helper:parse-version versions:set -DnewVersion=\${project.version}-LOCAL$(cat /proc/sys/kernel/random/uuid) -DprocessAllModules=true versions:commit
1458+
1459+ SDK_VERSION=$(xmlstarlet sel -t -m "/_:project/_:version" -v . pom.xml )
14561460 echo $SDK_VERSION > SDK_VERSION
14571461 cat SDK_VERSION
14581462 - run :
14591463 name : INSTALL SDK
14601464 command : |
14611465 cd ~/projects/openEHR_SDK
1462- mvn install -Dmaven.javadoc.skip=true -Djacoco.skip=true -Dmaven.test.skip
1463-
1464-
1466+ mvn install -Dmaven.javadoc.skip=true -Djacoco.skip=true -Dmaven.test.skip
1467+
1468+
14651469 start-ehrbase-and-run-java-integration-sdk-tests :
14661470 description : |
14671471 Starts ehrbase server and runs maven test phase using 'slow' profile defined in parent pom.xml
14681472 This way only the Java integration tests are executed.
14691473 steps :
1474+ - install-xml-cli-tool
14701475 - run :
14711476 name : Start EHRbase server and run SDK's java integration tests
14721477 command : |
14731478 ls -la
14741479 cd ~/projects
1475- EHRbase_VERSION=$(mvn -q -Dexec.executable="echo " -Dexec.args='${project.version}' --non-recursive exec:exec )
1480+ EHRbase_VERSION=$(xmlstarlet sel -t -m "/_:project/_:version " -v . pom.xml )
14761481 echo ${EHRbase_VERSION}
14771482 java -jar application/target/application-${EHRbase_VERSION}.jar --cache.enabled=true --plugin-manager.enable=true --plugin-manager.plugin-dir='tests/test_plugin' --plugin-manager.plugin-config-dir='tests/test_plugin_config_dir'> log &
14781483 grep -m 1 "Started EhrBase in" <(tail -f log)
@@ -1488,11 +1493,13 @@ commands:
14881493 This requires EHRbase + DB to be running during test execution.
14891494 steps :
14901495 - install-maven
1496+ - install-xml-cli-tool
14911497 - run :
14921498 name : Start EHRbase server and run all test of SDK
14931499 command : |
14941500 ls -la
1495- EHRbase_VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)
1501+
1502+ EHRbase_VERSION=$(xmlstarlet sel -t -m "/_:project/_:version" -v . pom.xml )
14961503 echo ${EHRbase_VERSION}
14971504 cd ~/projects # NOTE: This is where the target folder w/ artifacts were persisted to in previous step.
14981505 java -javaagent:/home/circleci/jacoco/lib/jacocoagent.jar=output=tcpserver,address=127.0.0.1 \
@@ -1646,12 +1653,12 @@ commands:
16461653 SDK_VERSION=$(cat ~/projects/openEHR_SDK/SDK_VERSION)
16471654 echo $SDK_VERSION
16481655 # cd ~/projects
1649- xmlstarlet edit --inplace -u /_:project/_:properties/_:ehrbase.sdk.version -v $SDK_VERSION pom.xml
1656+ xmlstarlet edit --inplace -u /_:project/_:properties/_:ehrbase.sdk.version -v $SDK_VERSION bom/ pom.xml
16501657 - run :
16511658 name : Show EHRbase's pom
1652- command : cat pom.xml
1659+ command : cat bom/pom.xml
1660+
16531661
1654-
16551662 build-and-test-ehrbase :
16561663 steps :
16571664 # - install-maven
@@ -1665,12 +1672,14 @@ commands:
16651672 start-ehrbase-server :
16661673 steps :
16671674 - install-maven
1675+ - install-xml-cli-tool
16681676 - run :
16691677 name : Start EHRbase server and wait for it to be ready
16701678 background : true
16711679 command : |
16721680 ls -la
1673- EHRbase_VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)
1681+
1682+ EHRbase_VERSION=$(xmlstarlet sel -t -m "/_:project/_:version" -v . pom.xml )
16741683 echo ${EHRbase_VERSION}
16751684 java -jar application/target/application-${EHRbase_VERSION}.jar --cache.enabled=true --plugin-manager.enable=true --plugin-manager.plugin-dir='tests/test_plugin' --plugin-manager.plugin-config-dir='tests/test_plugin_config_dir' > log &
16761685 grep -m 1 "Started EhrBase in" <(tail -f log)
0 commit comments