summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_setup_fdroid_build_environment.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-01-27 13:19:01 +0100
committerHolger Levsen <holger@layer-acht.org>2016-01-27 13:19:01 +0100
commit3cd9d142607519d9141d76fb6ff74f5c22485d76 (patch)
tree500f0c94c5a38cc6948ad103d2b8aa38156cc2ff /bin/reproducible_setup_fdroid_build_environment.sh
parent380f6555cc1194af7925877c7041b8c5852de448 (diff)
downloadjenkins.debian.net-3cd9d142607519d9141d76fb6ff74f5c22485d76.tar.xz
reproducible fdroid: cleanup workspace at the beginning of the job instead of the end
Diffstat (limited to 'bin/reproducible_setup_fdroid_build_environment.sh')
-rwxr-xr-xbin/reproducible_setup_fdroid_build_environment.sh17
1 files changed, 7 insertions, 10 deletions
diff --git a/bin/reproducible_setup_fdroid_build_environment.sh b/bin/reproducible_setup_fdroid_build_environment.sh
index 0c406625..99550f7d 100755
--- a/bin/reproducible_setup_fdroid_build_environment.sh
+++ b/bin/reproducible_setup_fdroid_build_environment.sh
@@ -13,27 +13,24 @@ common_init "$@"
# common code
. /srv/jenkins/bin/reproducible_common.sh
-# define work space (differently than jenkins would normally do as we run via ssh on a different node…)
+# define and clean work space (differently than jenkins would normally do as we run via ssh on a different node…)
WORKSPACE=$BASE/fdroid
+# TODO:
+#
+# add locking here to only run this if no build job is running…
+#
+# not yet needed, as we don't have any build jobs yet
+rm $WORKSPACE -r
mkdir -p $WORKSPACE
cleanup_all() {
echo "$(date -u) - cleanup in progress..."
killall VBoxHeadless || true
sleep 10
- rm $WORKSPACE -r
echo "$(date -u) - cleanup done."
}
trap cleanup_all INT TERM EXIT
-# TODO:
-#
-#
-# add locking here to only run this if no build job is running…
-#
-#
-# not yet needed, as we don't have any build jobs yet
-
# make sure we have the vagrant box image cached
test -e ~/.cache/fdroidserver || mkdir -p ~/.cache/fdroidserver