From f4cb9aad1d26b4808d3ac1d791f82c3815d142ea Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 3 Sep 2018 15:28:29 +0300 Subject: Add temporary build database cleanup code to ci-load --- brep/handler/ci/ci-load.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/brep/handler/ci/ci-load.in b/brep/handler/ci/ci-load.in index 98078b3..da5fb91 100644 --- a/brep/handler/ci/ci-load.in +++ b/brep/handler/ci/ci-load.in @@ -178,6 +178,20 @@ run echo "$repository $display_name cache:cache" >"$loadtab" # run "$loader" "${loader_options[@]}" --force --shallow "$loadtab" +# @@ TMP TENANCY: before we add tenancy support we also need to manually +# cleanup the build database. We will assume the cleanup code to optionally +# be present in a separate bash script which path is deduced from the +# handler's own path by adding the -clean suffix. +# +cleaner="$0-clean" +if [ -f "$cleaner" ]; then + + # Let's pass the CI request data directory to the cleaner, so it can create + # temporary files in this directory. + # + run "$cleaner" "$data_dir" +fi + # Remove the no longer needed CI request data directory. # run rm -r "$data_dir" -- cgit v1.1