mirror of
https://github.com/outbackdingo/debos.git
synced 2026-01-27 10:18:47 +00:00
The docker-compose test strategy was mainly done for integration with dockerhub, but as dockerhub no longer builds our images it's not that relevant. What's more interesting is to use the docker container we've build to run a selection of debos recipes, whose successfull build indicate success. This both makes it easier to test locally as well (just run the debos recipe) and makes the test jobs more specific. On top of the existing test this also adds a "debian" test which does some basic debian smoketesting (debootstrap and apt) as well as a basic "partitioning" test. The partitioning test unforutunately doesn't work in the nofakemachine run as udev isn't available in the container, so that only runs on UML and Qemu based backends. Current the kvm backend isn't tested because the standard github action runners don't support kvm. But qemu, though being lots slower, covers some part of it. Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
debos
Docker container for 'debos' tool.
Installation
docker pull godebos/debos
Debos needs virtualization to be enabled on the host and shared with the container.
Check that kvm is enabled and writable by the user running the docker container by running ls /dev/kvm
Usage
/!\ This container should be used as an executable, i.e. there is no need to add debos after godebos/debos.
To build recipe.yaml:
cd <PATH_TO_RECIPE_DIR>
docker run --rm --interactive --tty --device /dev/kvm --user $(id -u) --workdir /recipes --mount "type=bind,source=$(pwd),destination=/recipes" --security-opt label=disable godebos/debos <RECIPE.yaml>
Container build
To build the debos container image from current git branch:
docker build -f docker/Dockerfile -t godebos/debos .
Tests
Unit tests
Run unit tests:
docker-compose -f docker/unit-tests.test.yml up --build --exit-code-from=sut