path: root/brep/handler
diff options
authorKaren Arutyunov <karen@codesynthesis.com>2018-09-03 15:28:29 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-09-03 15:28:29 +0300
commitf4cb9aad1d26b4808d3ac1d791f82c3815d142ea (patch)
treee82342d3d55cac803b1e822c051658d9481668be /brep/handler
parentb1888e516c9c9d750726318227bf69856ec91b8b (diff)
Add temporary build database cleanup code to ci-load
Diffstat (limited to 'brep/handler')
1 files changed, 14 insertions, 0 deletions
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.
+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"
# Remove the no longer needed CI request data directory.
run rm -r "$data_dir"