summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-02-11 14:35:12 +0100
committerHolger Levsen <holger@layer-acht.org>2016-02-11 14:35:12 +0100
commit61a0e9d56ca47fc460fda371d5be8072d671ec83 (patch)
treec388e38261f04368ab7a1b7b6e2577f4b3f7afc6 /bin
parentbb56208f749e54ca875079882132b0644e7386ad (diff)
downloadjenkins.debian.net-61a0e9d56ca47fc460fda371d5be8072d671ec83.tar.xz
Revert "reproducible fdroid: use upstream script to run job"
This reverts commit 23a9c866b836009fc06fa2f75f692d163606d70b.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_setup_fdroid_build_environment.sh40
1 files changed, 34 insertions, 6 deletions
diff --git a/bin/reproducible_setup_fdroid_build_environment.sh b/bin/reproducible_setup_fdroid_build_environment.sh
index e1858271..09d94747 100755
--- a/bin/reproducible_setup_fdroid_build_environment.sh
+++ b/bin/reproducible_setup_fdroid_build_environment.sh
@@ -15,15 +15,43 @@ common_init "$@"
# define and clean work space (differently than jenkins would normally do as we run via ssh on a different node…)
WORKSPACE=$BASE/fdroid
-
# TODO:
#
# add locking here to only run this if no build job is running…
+#
+# not yet needed, as we don't have any build jobs yet
+rm $WORKSPACE -rf
+mkdir -p $WORKSPACE
+
+cleanup_all() {
+ echo "$(date -u) - cleanup in progress..."
+ killall VBoxHeadless || true
+ sleep 10
+ echo "$(date -u) - cleanup done."
+}
+trap cleanup_all INT TERM EXIT
+
+
+# make sure we have the vagrant box image cached
+test -e ~/.cache/fdroidserver || mkdir -p ~/.cache/fdroidserver
+cd ~/.cache/fdroidserver
+wget --continue https://f-droid.org/jessie32.box || true
+echo "ff6b0c0bebcb742783becbc51a9dfff5a2a0a839bfcbfd0288dcd3113f33e533 jessie32.box" > jessie32.box.sha256
+sha256sum -c jessie32.box.sha256
+
+# wipe the whole vagrant setup and start from scratch
+export VAGRANT_HOME=$WORKSPACE/vagrant.d
+rm -rf $VAGRANT_HOME
-# fdroidserver.git/jenkins-build-makebuildserver assumes $WORKSPACE is
-# the root of fdroidserver.git/
cd $WORKSPACE
+cd fdroidserver
+echo "boot_timeout = 1200" > makebuildserver.config.py
+./makebuildserver
+
+# we are done here, shutdown
+cd buildserver
+vagrant halt
-# this script is maintained upstream and is also run on Guardian
-# Project's jenkins box
-./jenkins-build-makebuildserver
+# remove trap
+trap - INT TERM EXIT
+echo "$(date -u) - the end."