]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-pr-syntax-check: add sign-off check 1063/head
authorSébastien Han <seb@redhat.com>
Mon, 2 Jul 2018 14:02:35 +0000 (16:02 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 2 Jul 2018 14:02:35 +0000 (16:02 +0200)
We now fail if the commits don't contain a Signed-off-by certificate.

Signed-off-by: Sébastien Han <seb@redhat.com>
ceph-ansible-pr-syntax-check/build/build

index b5f77f5bc3bb29ac337cc6eb1f7d7c954e30259f..e5b3301c7c1abb632e912296cce37c67b055e382 100644 (file)
@@ -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