aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2025-02-26 08:45:52 -0600
committerDan Williams <dan@ioncontrol.co>2025-02-27 08:06:01 -0600
commit2a65ca978dfbdaac126d24edee852eba63ba800d (patch)
treeced2f035bbc54f44c41df1ce134aab7f38813325
parent703eee1610e103a19efb88647733ae6d07d13380 (diff)
ci: de-verbosify DCO check
Only print out the specific commits that fail DCO. Signed-off-by: Dan Williams <dan@ioncontrol.co>
-rw-r--r--.gitlab-ci.yml6
1 files changed, 4 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index de5d4567..02f42400 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,8 +36,10 @@ verify-dco:
if [[ -n "${CI_MERGE_REQUEST_DIFF_BASE_SHA}" ]]; then
export COMMITS=$(git log --no-merges --format="%H" ${CI_MERGE_REQUEST_DIFF_BASE_SHA}.. | xargs)
for c in "${COMMITS}"; do
- echo "Checking commit ${c} for DCO Signed-off-by"
- git log --format="%b" -1 ${c} | grep "Signed-off-by: .* <.*@.*>"
+ $(git log --format="%b" -1 ${c} | grep -q "^Signed-off-by: .* <.*@.*>") && rc="$?" || rc="$?"
+ if [[ rc -eq 1 ]]; then
+ echo "Commit ${c} failed DCO Signed-off-by check"
+ fi
done
fi