]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-pr-syntax-check: return 1 only on failure 1069/head
authorSébastien Han <seb@redhat.com>
Tue, 3 Jul 2018 12:12:12 +0000 (14:12 +0200)
committerSébastien Han <seb@redhat.com>
Tue, 3 Jul 2018 12:18:38 +0000 (14:18 +0200)
This was a leftover from an initial attempt with if combinaison. We now
return 1 only if the test line fails.

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

index 4f1e71eebc51716dcc37e8c3e779ab91a529dd69..3be3ec970ada2bda3dfea0889be98371ea68a248 100644 (file)
@@ -50,8 +50,8 @@ function group_vars_check {
 function test_sign_off {
   git fetch
   # shellcheck disable=SC2154
-  test "$(git log --oneline --no-merges origin/"${ghprbTargetBranch}"..HEAD | wc -l)" -ne "$(git log --no-merges origin/"${ghprbTargetBranch}"..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
+  # ghprbTargetBranch variable comes from jenkins's injectedEnvVars
+  test "$(git log --oneline --no-merges origin/"${ghprbTargetBranch}"..HEAD | wc -l)" -ne "$(git log --no-merges origin/"${ghprbTargetBranch}"..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
 }