mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-05 06:50:10 +01:00
e44f6380e9
The other apps are too flaky on gpjenkins right now, and that's our only box for running full buildserver tests. Once we get the buildserver tests running on jenkins.debian.net, then we can add a bunch more apps to the test script. gpjenkins is an extra locked down box, so that's why the builds are flaky: gradle and maven downloads regularly fail because they are blocked.
75 lines
2.2 KiB
Bash
Executable File
75 lines
2.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ `dirname $0` != "." ]; then
|
|
echo "only run this script like ./`basename $0`"
|
|
exit
|
|
fi
|
|
|
|
if [ -z $WORKSPACE ]; then
|
|
WORKSPACE=`pwd`
|
|
fi
|
|
|
|
# make sure that no VirtualBox processes are left running
|
|
cleanup_all() {
|
|
echo "$(date -u) - cleanup in progress..."
|
|
ps auxww|grep VBox
|
|
cd $WORKSPACE/buildserver
|
|
vagrant halt || true
|
|
sleep 5
|
|
killall VBoxHeadless || true
|
|
sleep 5
|
|
killall -9 VBoxHeadless || true
|
|
echo "$(date -u) - cleanup done."
|
|
}
|
|
trap cleanup_all INT TERM EXIT
|
|
|
|
set -e
|
|
set -x
|
|
|
|
# make sure we have the vagrant box image cached
|
|
test -e ~/.cache/fdroidserver || mkdir -p ~/.cache/fdroidserver
|
|
cd ~/.cache/fdroidserver
|
|
wget --tries=1 --timeout=5 --continue https://f-droid.org/jessie64.box || true
|
|
echo "de3e3c4a9c13e8c015e30edeea0f583b195d1ee8ff9ad4814e933bbfb560200f jessie64.box" > jessie64.box.sha256
|
|
sha256sum -c jessie64.box.sha256
|
|
|
|
# redirect homes to be in the git repo, so they'll get cleaned and reset
|
|
export XDG_CONFIG_HOME=$WORKSPACE
|
|
export VBOX_USER_HOME=$WORKSPACE/VirtualBox
|
|
mkdir $VBOX_USER_HOME
|
|
VBoxManage setproperty machinefolder $WORKSPACE/virtualbox.d
|
|
VBoxManage setproperty logginglevel debug
|
|
export VAGRANT_HOME=$WORKSPACE/vagrant.d
|
|
mkdir $VAGRANT_HOME
|
|
|
|
cd $WORKSPACE
|
|
echo "debian_mirror = 'http://ftp.uk.debian.org/debian/'" > $WORKSPACE/makebuildserver.config.py
|
|
echo "boot_timeout = 1200" >> $WORKSPACE/makebuildserver.config.py
|
|
echo "apt_package_cache = True" >> $WORKSPACE/makebuildserver.config.py
|
|
./makebuildserver --verbose
|
|
|
|
# this can be handled in the jenkins job, or here:
|
|
if [ -e fdroiddata ]; then
|
|
cd fdroiddata
|
|
git checkout master
|
|
git pull
|
|
cd ..
|
|
else
|
|
git clone --depth 1 https://gitlab.com/fdroid/fdroiddata.git fdroiddata
|
|
fi
|
|
|
|
cd fdroiddata
|
|
echo "build_server_always = True" > config.py
|
|
# if it can't build fdroid, then its really broken
|
|
../fdroid build --verbose --stop --latest org.fdroid.fdroid
|
|
# Gradle, JNI, preassemble
|
|
../fdroid build --stop org.adaway:55
|
|
# Maven
|
|
#../fdroid build --stop org.quantumbadger.redreader:55
|
|
# Custom build (make)
|
|
#../fdroid build --stop com.amaze.filemanager:29
|
|
# Uses verification
|
|
#../fdroid build --stop info.guardianproject.checkey:101
|
|
# Gradle with retrolambda (JDK7 and JDK8)
|
|
#../fdroid build --stop com.moez.QKSMS:124
|