From c64551b4f51b3a83ea825f8287950b7472545f7c Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 24 Oct 2017 12:51:33 +0100 Subject: .gitlab-ci.yml: Make the cache a hidden directory YBD scans the current working directory for definition files, which is problematic now that we store hundreds of cached Git repos and OSTree repos in a subdir of the definitions repo. To avoid wasting loads of time calling stat() on tens of thousands of directories, the cache is now in a hidden directory. This depends on a change to YBD that causes it to efficiently ignore hidden directories: https://gitlab.com/baserock/ybd/commit/6676c4ac0 --- .gitlab-ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 391fe742..cfacc42f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,10 +3,12 @@ image: buildstream/buildstream-fedora:latest variables: # Store everything under the /builds directory. This is a separate Docker # volume. Note that GitLab CI will only cache stuff inside the build - # directory. - XDG_CACHE_HOME: "${CI_PROJECT_DIR}/cache" + # directory. Note also that YBD recursively scans the current directory + # to find what definitions to build -- that's why we put the cache in a + # hidden directory. + XDG_CACHE_HOME: "${CI_PROJECT_DIR}/.cache" YBD_base: "/cache/ybd_base" - YBD_gits: "${CI_PROJECT_DIR}/cache/ybd_base/gits" + YBD_gits: "${CI_PROJECT_DIR}/.cache/ybd_base/gits" GET_SOURCES_ATTEMPTS: 3 # Store all the downloaded git and ostree repos in the distributed cache. @@ -104,7 +106,7 @@ ybd-build-system-x86_64-chroot-deploy: key: default policy: pull paths: - - cache/ybd_base/gits + - .cache/ybd_base/gits artifacts: name: "${CI_BUILD_NAME}-${CI_BUILD_REF}" paths: @@ -184,7 +186,7 @@ ybd-minimal-system-x86_64-chroot-deploy: key: default policy: pull paths: - - cache/ybd_base/gits + - .cache/ybd_base/gits artifacts: name: "${CI_BUILD_NAME}-${CI_BUILD_REF}" paths: -- cgit v1.2.1