From f42a1cfa501d67a0fa96def4a1ff352c2b214620 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 27 Oct 2017 22:10:17 +0200 Subject: add osmo-clean-workspace.sh, use in osmo-deps.sh So far, each jenkins job does its own cleanup, more or less well. Also, jenkins git config offers the 'Clean before checkout' option, which seems to fail when there are non-writable leftovers from a failed 'make distcheck'. Furthermore, our jenkins build slaves have unused compiled binaries piling up by the gigabytes: each matrix build x each parallel build and each compiled dependency therein builds .o, .a, .so and executables plus installs them to a local prefix, and just leaves them sitting around to rot until the job runs again. Instead, we want to clean them out when building is done. All of this calls for a unified cleanup script that knows how to clean a workspace properly, to run once before and once after each jenkins build. Here it is. Use that function in osmo-deps.sh instead of duplicating cleanup steps. Change-Id: I2409b2928b4d7ebbd6c005097d4ad7337307dd93 --- scripts/osmo-deps.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/osmo-deps.sh') diff --git a/scripts/osmo-deps.sh b/scripts/osmo-deps.sh index 86da9a6..c256a6a 100755 --- a/scripts/osmo-deps.sh +++ b/scripts/osmo-deps.sh @@ -8,5 +8,11 @@ fi cd $1 git fetch origin + +# Cleanup should already have happened during a global osmo-clean-workspace.sh, +# but in case the caller did not (want to) call that, let's also do cleanup in +# the dep subdir separately: +osmo-clean-workspace.sh + git reset --hard origin/master git rev-parse HEAD -- cgit v1.2.3