Continuous Integration

This describes aspects of Continuous Integration setup specifically for OpenCraft, and is of limited interest for external contributors.

CI specific env file

Because we couldn't find a way to establish DNS/hostname for each container in circleci, we had to build an additional env file for CI.

Only below variables in differ from .env.test.

# .env.test

Reason: When using docker-compose locally, we may connect to services by their names, for example, to connect to postgresql from another container, we can use a url like this: postgres://opencraft@postgresql/opencraft, but postgres is only available on localhost inside circleci.

Cleaning up left-over resources

Test runs (especially failing ones) may occasionally leave behind resources that, over time, clutter the underlying infrastructure.

To avoid this, there is a scheduled-cleanup CircleCI workflow that regularly runs the cleanup job.

If necessary (usually when testing changes to it), the job may be run on-demand by pushing to the ci-cleanup branch.