-
Clone the following repositories:
-
Setting up osbuild-composer(-api)
Move to image-builder folder. The easiest way to do this is to call schutzbots/provision-composer.sh. This will install composer, generate the needed certs, and put the configuration in place.
-
In image-builder folder, run all the unit tests:
# go clean -testcache # Clean cache before rerun unit tests # go test ./... # Recursively run all the unit tests
-
Build image-builder docker image.
Call schutzbots/build.sh. It will build image-builder and image-builder-tests packages, install them into your testbed, and build an image-builder docker image
# export WORKSPACE=. # export JOB_NAME= # sudo schutzbots/build.sh
-
Run integration test
Call schutzbot/run_tests.sh. It will start a image-builder container and run image-builder-tests. Or alternatively, run the integration test manually:
# sudo podman run -d --pull=never --security-opt "label=disable" --net=host \ -e LISTEN_ADDRESS=localhost:8087 -e OSBUILD_URL=https://localhost:443/api/composer/v1 \ -e OSBUILD_CA_PATH=/etc/osbuild-composer/ca-crt.pem \ -e OSBUILD_CERT_PATH=/etc/osbuild-composer/client-crt.pem \ -e OSBUILD_KEY_PATH=/etc/osbuild-composer/client-key.pem \ -v /etc/osbuild-composer:/etc/osbuild-composer \ image-builder # Start image-builder container # go test ./cmd/... -tags=integration # Run integration test
- Coverage report is available from CodeCov.