--- /dev/null
+#!/usr/bin/env python
+from subprocess import Popen, PIPE
+import os
+
+target_branch = os.getenv('ghprbTargetBranch', 'master')
+source_branch = os.getenv('ghprbSourceBranch', 'HEAD')
+
+command = ['git', 'log', '%s..%s' % (target_branch, source_branch)]
+
+
+process = Popen(
+ command,
+ stdout=PIPE,
+ stderr=PIPE,
+ close_fds=True
+)
+
+returncode = process.wait()
+
+stdout = process.stdout.read()
+stderr = process.stderr.read()
+
+# git log output goes to stdout so process that
+
+for chunk in stdout.split('commit '): # we are interested in every commit chunk
+ if not 'Signed-off-by:' in chunk:
+ raise SystemExit('A commit is missing "Signed-off-by"')
--- /dev/null
+- job:
+ name: ceph-pr-commits
+ project-type: freestyle
+ defaults: global
+ display-name: 'ceph: Pull Request commits'
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+ properties:
+ - github:
+ url: https://github.com/ceph/ceph/
+ logrotate:
+ daysToKeep: 15
+ numToKeep: 30
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+
+ parameters:
+ - string:
+ name: sha1
+ description: "A pull request ID, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ admin-list:
+ - alfredodeza
+ - ktdreyer
+ - andrewschoen
+ - dmick
+ org-list:
+ - ceph
+ white-list:
+ - jcsp
+ - gregsfortytwo
+ - GregMeno
+ - dzafman
+ - dillaman
+ - dachary
+ - liewegas
+ - idryomov
+ - vasukulkarni
+ trigger-phrase: ''
+ only-trigger-phrase: false
+ github-hooks: true
+ permit-all: false
+ auto-close-on-fail: false
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph.git
+ branches:
+ - ${sha1}
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: true
+
+ builders:
+ - shell:
+ !include-raw: ../../build/build
+ # NOTE: no publishing yet as we want to prevent errors in the
+ # new checks. Once this is robust enough we should uncomment
+ # to fully enable notifications. Maybe consider a comment on the
+ # Pull Request vs. a simple notification?
+ #publishers:
+ # - github-notifier