[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/4] gitlab-ci: Fix Avocado cache usage
From: |
Thomas Huth |
Subject: |
Re: [PATCH v2 4/4] gitlab-ci: Fix Avocado cache usage |
Date: |
Tue, 4 Aug 2020 18:32:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 04/08/2020 18.24, Alex Bennée wrote:
>
> 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>?
Isn't that tag rather used for expressing dependencies between patch
series? See
https://wiki.qemu.org/Contribute/SubmitAPatch#Base_patches_against_current_git_master
?
>>
>> 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:
I'm still fighting YAML syntax when it comes to such cases ... so I'm
open to suggestions!
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Thanks a lot!
Thomas