From: Sébastien Han Date: Mon, 2 Jul 2018 14:02:35 +0000 (+0200) Subject: ceph-ansible-pr-syntax-check: add sign-off check X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1063%2Fhead;p=ceph-build.git ceph-ansible-pr-syntax-check: add sign-off check We now fail if the commits don't contain a Signed-off-by certificate. Signed-off-by: Sébastien Han --- diff --git a/ceph-ansible-pr-syntax-check/build/build b/ceph-ansible-pr-syntax-check/build/build index b5f77f5b..e5b3301c 100644 --- a/ceph-ansible-pr-syntax-check/build/build +++ b/ceph-ansible-pr-syntax-check/build/build @@ -46,6 +46,11 @@ function group_vars_check { fi } +function test_sign_off { + test "$(git log --oneline origin/HEAD..HEAD | wc -l)" -ne "$(git log origin/HEAD..HEAD | grep -c Signed-off-by)" && echo "One or more commits is/are missing a Signed-off-by. Add it with 'git commit -s'." + return 1 +} + ######## # MAIN # @@ -54,3 +59,4 @@ cd "$WORKSPACE"/ceph-ansible syntax_check #ansible_lint group_vars_check +test_sign_off