Skip to content
Snippets Groups Projects
Unverified Commit 4f3ede33 authored by Clayton Craft's avatar Clayton Craft :speech_balloon: Committed by Caleb Connolly
Browse files

ci: add basic integration testing for pmb (MR 2444)

parent 35cd6408
No related branches found
No related tags found
1 merge request!2444ci: add basic integration test for pmb
Pipeline #208667 passed
#!/bin/sh -e
set -x
if [ "$(id -u)" = 0 ]; then
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
pmbootstrap() {
./pmbootstrap.py --details-to-stdout "$@"
}
# Make sure that the work folder format is up to date, and that there are no
# mounts from aborted test cases (pmbootstrap#1595)
echo "Initializing pmbootstrap"
yes '' | ./pmbootstrap.py --details-to-stdout init
pmbootstrap work_migrate
pmbootstrap -q shutdown
# TODO: make device configurable?
device="qemu-amd64"
# TODO: make UI configurable?
ui="phosh"
pmbootstrap config device "$device"
pmbootstrap config ui "$ui"
# NOTE: --no-image is used because building images makes pmb try to
# "modprobe loop". This fails in CI.
echo "Building $ui image for $device"
pmbootstrap -y install --zap --password 147147 --no-image
echo "Building $ui image for $device, with FDE"
pmbootstrap -y install --zap --password 147147 --fde --no-image
......@@ -95,3 +95,19 @@ deploy:
- rsync -hrvz --delete -e "ssh -p ${SSH_PORT}" public/ "${SSH_HOST}":/var/www/docs.postmarketos.org/pmbootstrap/
environment:
name: deploy
integration:
stage: test
before_script:
- *global_before_scripts
- apk upgrade -U
- apk add doas git losetup python3 openssl
- echo "permit nopass build" > /etc/doas.d/ci-user.conf
script:
- ".ci/integration.sh"
after_script:
- "cp /home/build/.local/var/pmbootstrap/log.txt ."
artifacts:
when: on_failure
paths:
- "log.txt"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment