-
Notifications
You must be signed in to change notification settings - Fork 17
Continuous Integration Strategy
Github Actions has several advantages over Travis CI and DockerHub Autobuilds.
- 2021 Travis pricing plans for open source are infeasible
- Dockerhub autobuild only supports x86_64 images, however we have an interest in supporting the PowerPC architecture
- Single-platform continuous integration can be test-aware (what if tests on Travis fail, but Dockerhub builds latest images anyway?)
Define a Github Actions workflow .github/workflows/ci.yml
which runs tests and builds docker images.
Unit tests (nosetests
) and integration tests are run concurrently in separate jobs. If both jobs pass, build a docker image. The docker image should support both amd64
and ppc64le
architectures. Finally, the built images are pushed to Dockerhub.
Reference implementation: https://github.com/FNNDSC/pfioh/blob/master/.github/workflows/ci.yml
The docker image is tagged :latest
when the workflow is triggered by a push, or :<tagname>
when triggered by a git tag. Tag and push for the same commit trigger two separate workflow events. In effect, when a new version is committed, tagged, and pushed, the same image is built twice and it will have the docker tags :latest
and :<tagname>
.
Example:
DOCKER_USERNAME
, DOCKER_PASSWORD
, and SLACK_WEBHOOK
should be stored in organization-wide secrets.
The file Dockerfile_dev
is still built on Dockerhub autobuilds with the tag :dev
. Its base image is fnndsc/ubuntu-python3
(which I would like to call legacy) and it contains extra packages which might be helpful for debugging.