chiark / gitweb /
makebuildserver: change mem default 2 GB
[fdroidserver.git] / jenkins-build-makebuildserver
index ae3391a09c90a9c75f6b74e01386f57f794fbe5f..5238536f5d79ca0b30fe884c22f68aab234c663d 100755 (executable)
@@ -14,6 +14,8 @@ cleanup_all() {
     set +e
     echo "$(date -u) - cleanup in progress..."
     ps auxww | grep -e VBox -e qemu
+    virsh --connect qemu:///system list --all
+    ls -hl /var/lib/libvirt/images
     cd $WORKSPACE/buildserver
     vagrant halt
     sleep 5
@@ -49,7 +51,14 @@ cd $WORKSPACE
 echo "debian_mirror = 'https://deb.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 --clean
+echo "copy_caches_from_host = True" >> $WORKSPACE/makebuildserver.config.py
+./makebuildserver -vv --clean
+
+if [ -z "`vagrant box list | egrep '^buildserver\s+\((libvirt|virtualbox), [0-9]+\)$'`" ]; then
+    vagrant box list
+    echo "ERROR: buildserver box does not exist!"
+    exit 1
+fi
 
 # this can be handled in the jenkins job, or here:
 if [ -e fdroiddata ]; then
@@ -58,6 +67,7 @@ if [ -e fdroiddata ]; then
     git remote update -p
     git checkout master
     git reset --hard origin/master
+    git clean -fdx
     cd ..
 else
     git clone --depth 1 https://gitlab.com/fdroid/fdroiddata.git fdroiddata
@@ -70,7 +80,7 @@ if [ -z $ANDROID_HOME ]; then
         . ~/.android/bashrc
     else
         echo "ANDROID_HOME must be set!"
-        exit
+        exit 1
     fi
 fi
 
@@ -84,19 +94,20 @@ echo "build_server_always = True" >> config.py
 ../fdroid build --verbose --stop --latest org.fdroid.fdroid
 # Gradle, JNI, preassemble
 ../fdroid build --verbose --stop org.adaway:55
-# Uses verification
-../fdroid build --verbose --stop info.guardianproject.checkey:101
 # building old versions should still work
 ../fdroid build --verbose --stop org.fdroid.fdroid:96150
 # test OTA update ZIP build and publish
-../fdroid build --verbose --stop org.fdroid.fdroid.privileged.ota:2030
+../fdroid build --verbose --stop org.fdroid.fdroid.privileged.ota:2070
 
 # publish process when building and signing are on separate machines
 test -d repo || mkdir repo
 test -d archive || mkdir archive
+# copy everything over to run on SIGN machine
 ../fdroid publish --verbose
 ../fdroid gpgsign --verbose
+# copy everything over to run on BUILD machine
 ../fdroid update --verbose --nosign
+# copy everything over to run on SIGN machine
 ../fdroid signindex --verbose
 
 ../fdroid rewritemeta --verbose