image: alpine/latest packages: - coreutils - procps - py3-requests - xz sources: - "https://gitlab.com/postmarketOS/pmaports.git/" - "https://gitlab.com/postmarketOS/pmbootstrap.git/" - "https://gitlab.com/postmarketOS/build.postmarketos.org.git/" environment: BPO_TOKEN_FILE: "/home/build/.token" BPO_API_HOST: https://build.postmarketos.org BPO_JOB_NAME: repo_bootstrap BPO_WIP_REPO_URL: https://build.postmarketos.org/wip/staging/systemd/master/ BPO_WIP_REPO_ARG: '-mp http://build.postmarketos.org/wip/staging/systemd/' secrets: - 482975ec-22f7-49fd-9b54-486b0b1947c3 triggers: - action: webhook condition: failure url: https://build.postmarketos.org/api/public/update-job-status tasks: - bpo_setup: | export BPO_JOB_ID="$JOB_ID" # Switch branch and release channel mkdir -p ~/.config ( echo "[pmbootstrap]" echo "is_default_channel = False" ) > ~/.config/pmbootstrap.cfg git -C pmaports checkout master_staging_systemd sudo ln -s "$PWD"/pmbootstrap/pmbootstrap.py /usr/bin/pmbootstrap yes "" | pmbootstrap --aports=$PWD/pmaports -q init sudo modprobe binfmt_misc sudo mount -t binfmt_misc none /proc/sys/fs/binfmt_misc branch="$(git -C pmaports rev-parse --abbrev-ref HEAD)" if [ "$branch" != master_staging_systemd ]; then echo "ERROR: pmbootstrap switched to the wrong branch: $branch" exit 1 fi # Put apk cache into tmpfs to use less disk space (pma#1623) sudo mkdir -p /mnt/tmpfs-for-apks sudo mount -t tmpfs -o size=1500M tmpfs /mnt/tmpfs-for-apks WORK="$(pmbootstrap config work)" for arch in x86_64 aarch64 armv7; do mkdir -p /mnt/tmpfs-for-apks/cache_apk_"$arch" sudo rm -rf "$WORK"/cache_apk_"$arch" ln -s /mnt/tmpfs-for-apks/cache_apk_"$arch" "$WORK" done - repo_bootstrap: | export BPO_JOB_ID="$JOB_ID" pmbootstrap \ -m http://dl-cdn.alpinelinux.org/alpine/ -mp http://mirror.postmarketos.org/postmarketos/staging/systemd/ \ --aports=$PWD/pmaports \ --timeout 900 \ --details-to-stdout \ repo_bootstrap \ --arch armv7 \ systemd - checksums: | export BPO_JOB_ID="$JOB_ID" cd "$(pmbootstrap -q config work)/packages/" sha512sum $(find . -name '*.apk') - submit: | export BPO_JOB_ID="$JOB_ID" export BPO_API_ENDPOINT="repo-bootstrap" export BPO_ARCH=armv7 export BPO_BRANCH=master_staging_systemd export BPO_DEVICE="" packages="$(pmbootstrap -q config work)/packages" export BPO_PAYLOAD_FILES="$(find "$packages" -name '*.apk')" export BPO_PAYLOAD_FILES_PREVIOUS="" export BPO_PAYLOAD_IS_JSON="0" export BPO_PKGNAME="" export BPO_UI="" export BPO_VERSION="" exec build.postmarketos.org/helpers/submit.py