The build will fail if any of the steps in the CI pipeline fails.
Codacy code quality analysis is invoked when a PR is created or when a commit is made directly to master. Right now we are checking our code against the default Codacy code patterns, but when the community establishes its own coding style guidelines, we should configure Codacy to check against these guidelines.
Once Travis detects that new code has been merged into the master branch, it begins the build and deploy pipeline execution by spinning up a Docker container, installing the specified version of node, and running:
This sets up the required eSaude EMR POC development environment.
Once the development environment has been prepared, the tests are run by executing:
This phase builds a deployable packaged archive from the latest code in master:
The result is a zip file called esaude-emr-poc-master.zip.
The deploy phase has two steps and will only be invoked when code is merged into master and not when a PR is created.
First, the distributable archive is uploaded to Bintray, our binary hosting service using Travis’ Bintray deployment provider. This is necessary in order to make the latest build from master publicly available so that we can use it to build the Docker containers in our dev test environment.
Finally, we initialise the database container with a clean database, then start up all the containers. The system running with the latest code will be available at http://dev.esaude.org after two or three minutes once the containers start up.
This phase reports the code coverage metrics to Codacy and Coveralls by running: