Skip to content

Continuous Integration

Jennings Zhang edited this page Dec 8, 2022 · 2 revisions

Background

Github Actions provides continuous integration, which can automatically build, test, and publish your software.

DockerHub (docker.io) and the Github Container Registry (ghcr.io) are container registries, which is where built container images are saved.

The *ChRIS Store* https://chrisstore.co is a web service which describes ChRIS plugins to a ChRIS backend. ChRIS plugin descriptions are published to the ChRIS Store. The plugin is associated with an image tag referencing an image in a container registry.

Developer’s Workflow

The developer’s workflow using CI looks like:

  1. Write code.

  2. git push

  3. Create a Github release.

After these human-made actions (push or created release), a chain of automatic steps execute to build, test, and publish your software. Additionally, pull requests will be automatically tested but they will not be published until they are merged.

Repository Settings

Your Github repository settings should define the following secrets. For help, see https://docs.github.com/en/actions/reference/encrypted-secrets

Tip
use organization level secrets. If your repository lives under https://github.com/FNNDSC, there is nothing you need to do.
Table 1. Required Secrets
Name Value

DOCKERHUB_USERNAME

DockerHub username, e.g. "fnndscbot"

DOCKERHUB_PASSWORD

DockerHub password

CHRIS_STORE_USER

https://chrisstore.co login in the form of username:password e.g. "chris:chris1234"

Use CI

python-chrisapp-template provides the file .github/workflows/ci.yml which defines the instructions for Github Actions. It is important to read and understand this file before using CI.

Clone this wiki locally