chiark / gitweb /
makebuildserver: add gradle 4.7
[fdroidserver.git] / jenkins-build-all
index 2964a9f533cd8edf76d168417430295b766183e0..78a3239cf09d0147fe1ead83bb275594f250c41b 100755 (executable)
@@ -31,7 +31,6 @@ else
         echo "No virtualization is used."
 fi
 sudo /bin/chmod -R a+rX /var/lib/libvirt/images
-ulimit -n 2048
 echo 'maximum allowed number of open file descriptors: ' `ulimit -n`
 ls -ld /var/lib/libvirt/images
 ls -l /var/lib/libvirt/images || echo no access
@@ -50,7 +49,8 @@ export VBOX_USER_HOME=$SETUP_WORKSPACE/VirtualBox
 export VAGRANT_HOME=$SETUP_WORKSPACE/vagrant.d
 
 # make sure we have the right buildserver paths and its ready for use
-vagrant global-status | grep reproducible_setup_fdroid_build_environment
+vagrant global-status \
+    | grep -F -e reproducible_setup_fdroid_build_environment -o -e fdroiddata/builder
 
 # the way we handle jenkins slaves doesn't copy the workspace to the slaves
 # so we need to "manually" clone the git repo hereā€¦
@@ -59,30 +59,39 @@ cd $WORKSPACE
 # set up Android SDK to use the Debian packages in stretch
 export ANDROID_HOME=/usr/lib/android-sdk
 
-# ignore username/password prompt for non-existant repos
-git config --global url."https://fakeusername:fakepassword@github.com".insteadOf https://github.com
-git config --global url."https://fakeusername:fakepassword@gitlab.com".insteadOf https://gitlab.com
-git config --global url."https://fakeusername:fakepassword@bitbucket.org".insteadOf https://bitbucket.org
-
 # now build the whole archive
 cd $WORKSPACE
 
 # this can be handled in the jenkins job, or here:
 if [ -e fdroiddata ]; then
     cd fdroiddata
-    git remote update -p
+    while ! git fetch origin --tags --prune; do sleep 10; done
     git checkout master
     git reset --hard origin/master
     # keep all the cloned source repos
-    git clean -fdx --exclude build
+    git clean -fdx --exclude build --exclude repo --exclude unsigned
 else
     git clone https://gitlab.com/fdroid/fdroiddata.git fdroiddata
     cd fdroiddata
 fi
 
 echo "build_server_always = True" > config.py
-$WORKSPACE/fdroid build --verbose --latest --no-tarball --all
+# if the local mediawiki is available, then use it
+if nc -z -w1 localhost 32445; then
+    wikiflag="--wiki"
+    echo "wiki_protocol = 'http'" >> config.py
+    echo "wiki_server = 'localhost:32445'" >> config.py
+    echo "wiki_path = '/mediawiki/'" >> config.py
+    echo "wiki_user = 'fdroid'" >> config.py
+    echo "wiki_password = 'update.TestCase'" >> config.py
+else
+    sed -i '/^wiki_/d' config.py
+fi
+
+$WORKSPACE/fdroid build --verbose --latest --no-tarball --all $wikiflag
 
 vagrant global-status
-cd builder
-vagrant status
+if [ -d builder ]; then
+    cd builder
+    vagrant status
+fi