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: build_package BPO_WIP_REPO_URL: https://build.postmarketos.org/wip/ BPO_WIP_REPO_ARG: '-mp http://build.postmarketos.org/wip/' 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 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 ]; then echo "ERROR: pmbootstrap switched to the wrong branch: $branch" exit 1 fi - install_pubkey: | export BPO_JOB_ID="$JOB_ID" echo -n '-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3xn8DlD4ZJuioKYBqsYH jY2dEtS9iIQ7Ud06HoxgY7QpiBB8GyXNpqW79vgkuhfayHv5C2eeRSs5fVhx4T5d Kr+SlqOp5wmo+3MfhL0zfYlKrt0XkjmkMiUwFEn9BcTAf6cDsJ838KCUyAmbCKDS Pivr5bZf1LDHK7/M//CVixoNJ8+Tj50X0BKbcz6LnyZ+R4Nk4udgymkzjZxoSlWF /bkduoeNrR5Me83C1YfVLzCT2QTdiw6OEU0EH2IzrgHkIx5bZF2Ezf4a4WQxEGSg L6L6smQSsDoMqYavpy8EmeOLK/28IS8WVgU18m5upZ1O/26icGp+QkOC/SlKkRu0 iwIDAQAB -----END PUBLIC KEY----- ' > pmbootstrap/pmb/data/keys/wip.rsa.pub - pmbootstrap_build: | export BPO_JOB_ID="$JOB_ID" pmbootstrap \ -m http://dl-cdn.alpinelinux.org/alpine/ $BPO_WIP_REPO_ARG -mp http://mirror.postmarketos.org/postmarketos/ \ --aports=$PWD/pmaports \ --no-ccache \ --timeout 900 \ --details-to-stdout \ build \ --no-depends \ --strict \ --arch riscv64 \ --force \ pbsplash - 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="build-package" export BPO_ARCH=riscv64 export BPO_BRANCH=master 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=pbsplash export BPO_UI="" export BPO_VERSION=0.3.1-r0 exec build.postmarketos.org/helpers/submit.py