Arch Linux AUR build bot using nspawn container
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
750 B

mkdir -p "${XDG_BUILDBOT_TMATE}"
CONFIG_FILE_LOC="$(mktemp --suffix="-aur-buildbot.conf")"
# Check if tmate sessions are empty
# TODO: implement concurrent builds
if [ -z "$(find "${XDG_BUILDBOT_TMATE}" -maxdepth 0 -empty -exec echo "1" ';')" ]; then
echo "Concurrent builds are not supported yet!"
exit 0
# Write configuration file
cat > "${CONFIG_FILE_LOC}" <<EOF
set-option -g tmate-webhook-url ""
set-option -g tmate-webhook-userdata "some private data"
# Start up tmate
tmate -S "${XDG_BUILDBOT_TMATE}/tmate-0.sock" -f "${CONFIG_FILE_LOC}" new-session -d '/usr/bin/python3 /bin/bash -i'
# Remove configuration file