chiark / gitweb /
jenkins: rename scripts based on jenkins.debian.net names
[fdroidserver.git] / jenkins-test
1 #!/bin/bash
2 #
3 # this is the script run by the Jenkins server to run the tools tests.  Be
4 # sure to always run it in its dir, i.e. ./jenkins-test, otherwise it might
5 # remove things that you don't want it to.
6 #
7 # runs here:
8 # https://jenkins.debian.net/job/reproducible_fdroid_test
9
10 if [ `dirname $0` != "." ]; then
11     echo "only run this script like ./`basename $0`"
12     exit
13 fi
14
15 # jenkins.debian.net slaves do not export WORKSPACE
16 if [ -z $WORKSPACE ]; then
17     export WORKSPACE=`pwd`
18 fi
19
20 set -e
21 set -x
22
23 cd tests
24 ./run-tests $WORKSPACE/fdroiddata/unsigned
25
26 # set up Android SDK to use the Debian packages in stretch
27 export ANDROID_HOME=/usr/lib/android-sdk
28
29 # the way we handle jenkins slaves doesn't copy the workspace to the slaves
30 # so we need to "manually" clone the git repo hereā€¦
31 cd $WORKSPACE/fdroiddata
32
33 test -e config.py || ../fdroid init --verbose
34
35 export GNUPGHOME=$WORKSPACE/tests/gnupghome
36 echo "build_server_always = True" > config.py
37 echo "gpghome = '$GNUPGHOME'" >> config.py
38 echo "gpgkey = 'CE71F7FB'" >> config.py
39
40 # publish process when building and signing are on separate machines
41 test -d repo || mkdir repo
42 test -d archive || mkdir archive
43 # when everything is copied over to run on SIGN machine
44 ../fdroid publish --verbose
45 ../fdroid gpgsign --verbose
46 # when everything is copied over to run on BUILD machine
47 ../fdroid update --verbose --nosign
48 # when everything is copied over to run on SIGN machine
49 ../fdroid signindex --verbose
50
51 ../fdroid rewritemeta --verbose
52 git --no-pager diff