[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/15] gitlab-ci: Replace YAML anchors by extends (acceptance
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 04/15] gitlab-ci: Replace YAML anchors by extends (acceptance_test_job) |
Date: |
Mon, 3 May 2021 11:45:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 5/3/21 11:22 AM, Thomas Huth wrote:
> On 19/04/2021 01.34, Philippe Mathieu-Daudé wrote:
>> From: Philippe Mathieu-Daudé <philmd@redhat.com>
>>
>> 'extends' is an alternative to using YAML anchors
>> and is a little more flexible and readable. See:
>> https://docs.gitlab.com/ee/ci/yaml/#extends
>>
>> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> .gitlab-ci.yml | 20 ++++++++++----------
>> 1 file changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>> index 11bda3abf33..07e5e737685 100644
>> --- a/.gitlab-ci.yml
>> +++ b/.gitlab-ci.yml
>> @@ -48,7 +48,7 @@ include:
>> # Avoid recompiling by hiding ninja with NINJA=":"
>> - make NINJA=":" $MAKE_CHECK_ARGS
>> -.acceptance_template: &acceptance_definition
>> +.acceptance_test_job_template:
>> cache:
>> key: "${CI_JOB_NAME}-cache"
>> paths:
>> @@ -111,7 +111,7 @@ acceptance-system-alpine:
>> variables:
>> IMAGE: alpine
>> MAKE_CHECK_ARGS: check-acceptance
>> - <<: *acceptance_definition
>> + extends: .acceptance_test_job_template
>
> FYI, I'm getting "YAML invalid" errors when adding this patch to my
> staging branch. I guess you cannot use extends twice in a job and you
> should extend the .acceptance_test_job_template from
> ..native_build_job_template instead.
I'm surprised because I tested/used that branch quite a lot.
Maybe a job using anchors got added meanwhile and I need to
rebase?