[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/3] gitlab: add jobs for checking paches
From: |
Daniel P . Berrangé |
Subject: |
[PATCH 0/3] gitlab: add jobs for checking paches |
Date: |
Fri, 18 Sep 2020 14:29:00 +0100 |
This introduces two new jobs to GitLab. The first runs "checkpatch.pl"
across all patches, while the second is a dedicated DCO signoff check.
While checkpatch.pl does validate DCO signoff, it is sub-optimal as we
need to allow the checkpatch.pl job to fail as there are always patches
which intentionally violate some rules, and we've no mechanism for marking
permitted exceptions in code. Thus the checkpatch.pl jobs needs to be
non-fatal allowing failure.
By having a separate DCO job, we can make that particular job mandatory.
Checking patches themselves in GitLab CI is a little difficult, as the
CI job receives no indication of what the base ancestor was for the
branch being tested. To work around this, we add the master QEMU git
repo as a new remote and ask git to find the common ancestor vs the
branch being tested.
An example pipeline showing failure of these two jobs is here:
https://gitlab.com/berrange/qemu/-/pipelines/191219666
The checkpatch.pl job failure output:
https://gitlab.com/berrange/qemu/-/jobs/743439455
And the DCO signoff job failure output:
https://gitlab.com/berrange/qemu/-/jobs/743439456
I think the latter shows the benefit of having a dedicated DCO signoff
job checker, as the info presented to the user is much clearer about
what they did wrong and how & why they must address it.
_+# base: master
Daniel P. Berrangé (3):
gitlab: add a CI job for running checkpatch.pl
gitlab: add a CI job to validate the DCO sign off
gitlab: assign python helper files to GitLab maintainers section
.gitlab-ci.d/check-dco.py | 94 +++++++++++++++++++++++++++++++++++++
.gitlab-ci.d/check-patch.py | 48 +++++++++++++++++++
.gitlab-ci.yml | 22 +++++++++
MAINTAINERS | 1 +
4 files changed, 165 insertions(+)
create mode 100755 .gitlab-ci.d/check-dco.py
create mode 100755 .gitlab-ci.d/check-patch.py
--
2.26.2
- [PATCH 0/3] gitlab: add jobs for checking paches,
Daniel P . Berrangé <=
- [PATCH 1/3] gitlab: add a CI job for running checkpatch.pl, Daniel P . Berrangé, 2020/09/18
- [PATCH 2/3] gitlab: add a CI job to validate the DCO sign off, Daniel P . Berrangé, 2020/09/18
- [PATCH 3/3] gitlab: assign python helper files to GitLab maintainers section, Daniel P . Berrangé, 2020/09/18
- Re: [PATCH 0/3] gitlab: add jobs for checking paches, no-reply, 2020/09/18
- Re: [PATCH 0/3] gitlab: add jobs for checking paches, no-reply, 2020/09/18
- Re: [PATCH 0/3] gitlab: add jobs for checking paches, Thomas Huth, 2020/09/18