From 58a33d0860f3da729f79dcc4cc9d232b52a974f0 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 27 Jun 2025 14:49:42 +0100 Subject: [PATCH] CI: clean up variable definitions Mostly taken from master, rationalise the variable definitions and stop hardcoding /persist/. Users of this CI will have to ensure that they've set CACHE_DIR if they want anything actually cached. Signed-off-by: Ross Burton Signed-off-by: Jon Mason --- .gitlab-ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd6cbd57..9c9eb741 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,10 @@ variables: # by default FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 0 FF_KUBERNETES_HONOR_ENTRYPOINT: 1 + # The directory to use as the persistent cache (the root for DL_DIR, + # SSTATE_DIR, etc). The default is the build tree which will not be + # persistent, so this should be set in the runner. + CACHE_DIR: $CI_PROJECT_DIR stages: - prep @@ -20,11 +24,12 @@ stages: interruptible: true variables: KAS_WORK_DIR: $CI_PROJECT_DIR/work - KAS_REPO_REF_DIR: $CI_BUILDS_DIR/persist/repos - SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate - DL_DIR: $CI_BUILDS_DIR/persist/downloads + KAS_BUILD_DIR: $KAS_WORK_DIR/build + KAS_REPO_REF_DIR: "" + SSTATE_DIR: $CACHE_DIR/sstate + DL_DIR: $CACHE_DIR/downloads BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml - TOOLCHAIN_DIR: $CI_BUILDS_DIR/persist/toolchains + TOOLCHAIN_DIR: $CACHE_DIR/toolchains IMAGE_DIR: $CI_PROJECT_DIR/work/build/tmp/deploy/images TOOLCHAIN_LINK_DIR: $CI_PROJECT_DIR/work/build/toolchains before_script: