From 3cd9d142607519d9141d76fb6ff74f5c22485d76 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 27 Jan 2016 13:19:01 +0100 Subject: reproducible fdroid: cleanup workspace at the beginning of the job instead of the end --- bin/reproducible_setup_fdroid_build_environment.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3-70-g09d2