summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_fdroid_build_apps.sh
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2017-04-24 13:22:14 +0200
committerHolger Levsen <holger@layer-acht.org>2017-04-24 13:31:45 +0200
commita964a2cb4b0f3e59912fb927998ed5a505cba3c7 (patch)
treecb89850b51b67158610e66193443bed1ada8f2c5 /bin/reproducible_fdroid_build_apps.sh
parent67719b1cdb0beb7404e300361281fa9f3a19a6f2 (diff)
downloadjenkins.debian.net-a964a2cb4b0f3e59912fb927998ed5a505cba3c7.tar.xz
reproducible fdroid: make fdroid_build_apps reuse the git repo
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin/reproducible_fdroid_build_apps.sh')
-rwxr-xr-xbin/reproducible_fdroid_build_apps.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/bin/reproducible_fdroid_build_apps.sh b/bin/reproducible_fdroid_build_apps.sh
index dc087358..e7310ed4 100755
--- a/bin/reproducible_fdroid_build_apps.sh
+++ b/bin/reproducible_fdroid_build_apps.sh
@@ -14,10 +14,23 @@ common_init "$@"
# common code
. /srv/jenkins/bin/reproducible_common.sh
-# define and clean work space (differently than jenkins would normally do as we run via ssh on a different node…)
+# define and clean work space on the machine actually running the
+# build. jenkins.debian.net does not use Jenkins slaves. Instead
+# /srv/jenkins/bin/jenkins_master_wrapper.sh runs this script on the
+# slave using a directl call to ssh.
WORKSPACE=$BASE/fdroid-build
-rm $WORKSPACE -rf
-mkdir -p $WORKSPACE
+if [ -e $WORKSPACE/.git ]; then
+ # reuse the git repo if possible, to keep all the setup in fdroiddata/
+ git clean -fdx
+ git reset --hard
+ git checkout master
+ git clean -fdx
+ git reset --hard
+else
+ rm -rf $WORKSPACE
+ git clone https://gitlab.com/eighthave/fdroidserver-for-jenkins.debian.net.git $WORKSPACE
+fi
+cd $WORKSPACE
cleanup_all() {
echo "$(date -u) - cleanup in progress..."