Skip to content
Snippets Groups Projects
Verified Commit ca53c117 authored by Clayton Craft's avatar Clayton Craft :speech_balloon:
Browse files

ci: add basic integration testing for pmb

parent 47dc4937
No related branches found
No related tags found
No related merge requests found
Pipeline #208617 failed
#!/bin/sh -e
set -x
if [ "$(id -u)" = 0 ]; then
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
pmaports="$(cd "$(dirname "$0")"/..; pwd -P)"
# 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.py work_migrate
# ./pmbootstrap.py config aports "$pmaports"
./pmbootstrap.py -q shutdown
# TODO: make device configurable?
device="qemu-amd64"
# TODO: make UI configurable?
ui="phosh"
./pmbootstrap.py config device "$device"
./pmbootstrap.py 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.py -y install --zap --password 147147 --no-image
echo "Building $ui image for $device, with FDE"
./pmbootstrap.py -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"
#!/bin/sh
set -euo pipefail
doas rm -r ~/.local/var/pmbootstrap/packages/systemd-edge/aarch64/ || true
pmbootstrap -y zap
pmbootstrap build --force apk-tools --src \~/src/apk-tools/ || true
pmbootstrap -y zap
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