This build directory contains scripts for executing LinuxForHealth FHIR Continous Integration (CI) tests.
Alternatively, LinuxForHealth FHIR can be built manually from the root of the project using Maven:
mvn clean install -f fhir-examples
mvn clean install -f fhir-parentThe latter command will execute the unit tests for each module.
If you want to skip the tests, add -DskipTests to the end of the command.
Once the project is built, the LinuxForHealth FHIR Server container image can be built from the Dockerfile under fhir-install:
docker build fhir-install -t linuxforhealth/fhir-serverThe LinuxForHealth FHIR Bulkdata Server container image can be built from the Dockerfile under fhir-install-bulkdata:
docker build fhir-install-bulkdata -t linuxforhealth/fhir-bulkdata-serverSteps to install the server to the local filesystem at the root of the project and execute the tests. These commands are expected to work on MacOS and/or Linux. For Windows, use the PowerShell (.ps1) variants instead.
- Build the project manually using the Maven commands listed above. This will produce the fhir-server-distribution.zip used to install the server.
From the root of the project (aka the "WORKSPACE"):
-
Set up and start the server
build/pre-integration-test.sh
-
Run the tests.
mvn test -DskipTests=false -f fhir-server-test -
Collect logs and clean up
build/post-integration-test.sh
Steps to run a dockerized LinuxForHealth FHIR Server and associated services. The specific services to run are defined in the docker-compose.yml files within the corresponding "environment" directories:
| Directory Name | Environment Description |
|---|---|
| minio | FHIR Server with a PostgreSQL backend, MinIO for bulk import/export, and NATS notifications |
| azurite | FHIR Server with a PostgreSQL backend, payload offloading to Azurite, and Azurite for bulk import/export |
The commands are expected to work on MacOS and/or Linux.
- Docker
linuxforhealth/fhir-server:latest(built from the fhir-install module as described above)-
linuxforhealth/fhir-bulkdata-server:latest(built from the fhir-install-bulkdata module as described above)
From the root of the project (aka the "WORKSPACE"):
-
Set up and start the containers
build/pre-integration-test-docker.sh ${environment}Note: If you are testing NATS notifications, invoke the NATS subscriber via
node fhir-server-test/src/test/nodejs/nats-subscriber. If this is your first time, install the dependencies first by installing Node.js (if not already installed) and running(cd fhir-server-test/src/test/nodejs && npm install). -
Run the tests.
mvn test -DskipTests=false -f fhir-server-test -
Collect logs and tear down the containers
build/post-integration-test-docker.sh ${environment}
The pre-integration-test-docker.sh script will:
- Configure volume mounts under the specified directory name and add the data and configuration needed for the tests.
- Bring up the containers and configure the database.
- Wait for the fhir-server healthcheck to pass and then exit.
FHIR® is the registered trademark of HL7 and is used with the permission of HL7.