[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/4] gitlab-ci: Fix Avocado cache usage
From: |
Alex Bennée |
Subject: |
Re: [PATCH v2 4/4] gitlab-ci: Fix Avocado cache usage |
Date: |
Tue, 04 Aug 2020 17:24:43 +0100 |
User-agent: |
mu4e 1.5.5; emacs 28.0.50 |
Thomas Huth <thuth@redhat.com> writes:
> In commit 6957fd98dc ("gitlab: add avocado asset caching") we
> tried to save the Avocado cache (as in commit c1073e44b4 with
> Travis-CI) however it doesn't work as expected. For some reason
> Avocado uses /root/avocado_cache/ which we can not select later.
>
> Manually generate a Avocado config to force the use of the
> current job's directory.
>
> This patch is based on an earlier version from Philippe Mathieu-Daudé.
Maybe add a Based-on: <msgid>?
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> .gitlab-ci.yml | 25 +++++++++++++++++++------
> 1 file changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index e96bcd50f8..9820066379 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -47,11 +47,24 @@ include:
> - find . -type f -exec touch {} +
> - make $MAKE_CHECK_ARGS
>
> -.post_acceptance_template: &post_acceptance
> +.acceptance_template: &acceptance_definition
> + cache:
> + key: "${CI_JOB_NAME}-cache"
> + paths:
> + - ${CI_PROJECT_DIR}/avocado-cache
> + policy: pull-push
> + before_script:
> + - mkdir -p ~/.config/avocado
> + - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
> + - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
> + >> ~/.config/avocado/avocado.conf
I was hoping there was a neater way to do this with the multiline
commands but whatever:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
- Re: [PATCH v2 4/4] gitlab-ci: Fix Avocado cache usage,
Alex Bennée <=