From 8e890341d967523f2aea5f31b4290c7cac1bd0c5 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 21 Oct 2018 22:58:40 +0300 Subject: [PATCH] Initial commit --- debug-attach.sh | 3 +++ init-tmate.sh | 25 +++++++++++++++++++++++++ testserver.py | 14 ++++++++++++++ vars.sh | 4 ++++ webhook-handler.py | 21 +++++++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100755 debug-attach.sh create mode 100755 init-tmate.sh create mode 100644 testserver.py create mode 100644 vars.sh create mode 100644 webhook-handler.py diff --git a/debug-attach.sh b/debug-attach.sh new file mode 100755 index 0000000..f4125aa --- /dev/null +++ b/debug-attach.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +tmate -S /run/user/1000/aur-buildbot/tmate-sockets/tmate-0.sock attach-session diff --git a/init-tmate.sh b/init-tmate.sh new file mode 100755 index 0000000..37ad46a --- /dev/null +++ b/init-tmate.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +source vars.sh + +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 +fi + +# Write configuration file +cat > "${CONFIG_FILE_LOC}" <