3 if [ `dirname $0` != "." ]; then
4 echo "only run this script like ./`basename $0`"
8 if [ -z $WORKSPACE ]; then
12 # make sure that no VirtualBox processes are left running
14 echo "$(date -u) - cleanup in progress..."
16 cd $WORKSPACE/buildserver
19 killall VBoxHeadless || true
21 killall -9 VBoxHeadless || true
22 echo "$(date -u) - cleanup done."
24 trap cleanup_all INT TERM EXIT
29 # make sure we have the vagrant box image cached
30 test -e ~/.cache/fdroidserver || mkdir -p ~/.cache/fdroidserver
31 cd ~/.cache/fdroidserver
32 wget --tries=1 --timeout=5 --continue https://f-droid.org/jessie32.box || true
33 echo "ff6b0c0bebcb742783becbc51a9dfff5a2a0a839bfcbfd0288dcd3113f33e533 jessie32.box" > jessie32.box.sha256
34 sha256sum -c jessie32.box.sha256
36 # redirect homes to be in the git repo, so they'll get cleaned and reset
37 export XDG_CONFIG_HOME=$WORKSPACE
38 export VBOX_USER_HOME=$WORKSPACE/VirtualBox
40 VBoxManage setproperty machinefolder $WORKSPACE/virtualbox.d
41 VBoxManage setproperty logginglevel debug
42 export VAGRANT_HOME=$WORKSPACE/vagrant.d
46 echo "debian_mirror = 'http://ftp.uk.debian.org/debian/'" > $WORKSPACE/makebuildserver.config.py
47 echo "boot_timeout = 1200" >> $WORKSPACE/makebuildserver.config.py
48 echo "apt_package_cache = True" >> $WORKSPACE/makebuildserver.config.py
49 ./makebuildserver --verbose
51 # this can be handled in the jenkins job, or here:
52 if [ -e fdroiddata ]; then
58 git clone --depth 1 https://gitlab.com/fdroid/fdroiddata.git fdroiddata
62 echo "build_server_always = True" > config.py
63 # Gradle, JNI, preassemble
64 ../fdroid build --stop org.adaway:55
66 ../fdroid build --stop org.quantumbadger.redreader:55
68 ../fdroid build --stop com.amaze.filemanager:29
70 ../fdroid build --stop info.guardianproject.checkey:101
71 # Gradle with retrolambda (JDK7 and JDK8)
72 ../fdroid build --stop com.moez.QKSMS:124