qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gitlab-ci: Be ready for new default 'main' branch name


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] gitlab-ci: Be ready for new default 'main' branch name
Date: Tue, 25 May 2021 19:33:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

On 5/25/21 6:08 PM, Daniel P. Berrangé wrote:
> On Tue, May 25, 2021 at 05:38:25PM +0200, Philippe Mathieu-Daudé wrote:
>> In order to be ready for the GitLab changes in using inclusive
>> terminology (replacing the 'master' branch name by the 'main'
>> branch name), rename our use of 'master' by the $CI_DEFAULT_BRANCH
>> environment variable, so new forks won't be facing any issue.
> 
> I've no objection to the actual config change, but the description is
> little inaccurate IMHO. GitLab is not forcing a branch name change
> into any existing repositories. It is entirely upto QEMU to decide
> when to change our branch names. Forks of QEMU also won't get a new
> branch name, because any branches in forks are inherited from what
> exists in repository being forked and not arbitrarily renamed.

Oh, then I misunderstood the overall change. Thanks for correcting me.

> So, AFAICT, only brand new (ie empty) repositories will get 'main'
> as the new default branch name.
> 
> IOW, I'd describe this as
> 
>   "We want to skip the checkpatch and DCO signoff jobs when
>    pushing to the default branch. Currently this branch is
>    called 'master', but we don't need to hardcode this in
>    the CI configuration, because the $CI_DEFAULT_BRANCH
>    env variable exposes it."

OK, I'll respin, thanks!

>> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>> index f718b61fa78..db4e8490483 100644
>> --- a/.gitlab-ci.yml
>> +++ b/.gitlab-ci.yml
>> @@ -784,7 +784,7 @@ check-patch:
>>    script: .gitlab-ci.d/check-patch.py
>>    except:
>>      variables:
>> -      - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 
>> 'master'
>> +      - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 
>> $CI_DEFAULT_BRANCH
>>    variables:
>>      GIT_DEPTH: 1000
>>    allow_failure: true
>> @@ -797,7 +797,7 @@ check-dco:
>>    script: .gitlab-ci.d/check-dco.py
>>    except:
>>      variables:
>> -      - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 
>> 'master'
>> +      - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 
>> $CI_DEFAULT_BRANCH
>>    variables:
>>      GIT_DEPTH: 1000
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> 
> 
> Regards,
> Daniel
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]