Rationale

DataSHIELD has a complex stack in which problems may creep in at various levels (e.g. a change in the operating system, a shared library, opal, R, other DataSHIELD functions etc). We also have a range of code authors working on variety of platforms. With this in mind we like to check new code works before it is accepted into the main code base, and we like to build the entire stack at regular intervals to make sure nothing has changed underneath us. We do this with continuous integration.

Process overview

In overview, we do this by:

Azure pipelines

We use the Azure DevOps pipelines continuous integration service to do this. It allows us to spin up a vanilla ubuntu VM (currently 16.04) with sudo privileges that we can run for an arbitrary length of time. We did initially use Travis, however the time limits became a barrier to running our tests which take ~40mins at time of writing (April 2020).

The behaviour of the pipeline is governed by a combination of settings in the Azure account (this is just permissions really) and the contents of a yml file in the root of the dsBaseClient - https://github.com/datashield/dsBaseClient/blob/master/azure-pipelines.yml  The yml file is (hopefully) well documented outlining what each of the stages are.

The Azure pipeline is connected to a GitHub repository from where it pulls in its configuration (via the yml file) and looks out for any changes which might require the pipeline to run.

Triggers

The pipeline is started either manually (logging into the azure pipeline account and clicking run) or when a predefined trigger criteria is met:

Build process

The idea here is to fail fast, so that's why we install dsBaseClient first, do some tests on that then install Opal/dsBase etc only if the first tests pass.

Build status

You can set up CI using your own Azure account

Full instructions with screenshots can be found here.

The key step is that you will need to set the endpoints so they match those defined in the azure-pipelines.yml file. Pick 'grant authorization'.

A guide on understanding and using CI once set up can be found here.

Future development