Merge request !1299 from 'dco3'

ci: fix a couple DCO check issues

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1299
This commit is contained in:
Dan Williams
2025-02-27 15:04:25 +00:00
+19 -17
View File
@@ -5,8 +5,8 @@ include:
- templates/ubuntu.yml
stages:
- precheck
- container prep
- precheck
- build
.common_variables:
@@ -25,22 +25,6 @@ stages:
LIBQRTR_BRANCH: 'main'
LIBMBIM_BRANCH: 'main'
verify-dco:
stage: precheck
extends:
- .fdo.distribution-image@ubuntu
- .common_variables
only:
- merge_requests
script: |
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: .* <.*@.*>"
done
fi
build container:
extends:
- .fdo.container-build@ubuntu
@@ -86,6 +70,24 @@ before_script:
popd
fi
verify-dco:
stage: precheck
extends:
- .fdo.distribution-image@ubuntu
- .common_variables
only:
- merge_requests
script: |
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
$(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
build-no-qmi:
stage: build
extends: