Add ZUUL_COMMIT.

To facilitate using zuul with just the jenkins git plugin, add
the ZUUL_COMMIT parameter.  Also, always include ZUUL_REF, whether
the job is pre- or post-commit.  If it's pre, it will be a
refs/zuul ref, if it's post, it will be refs/tags or a branch
name.

Change-Id: I88c38a28dcd552b2540095d36caacd10acf167b8
Reviewed-on: https://review.openstack.org/13934
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index d59a66a..9b621c4 100644
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -128,11 +128,15 @@
     path = os.path.join(GIT_ROOT, project)
     repo = git.Repo(path)
     ref = job.parameters['ZUUL_REF']
+    sha = job.parameters['ZUUL_COMMIT']
     repo_messages = [c.message.strip() for c in repo.iter_commits(ref)]
+    repo_shas = [c.hexsha for c in repo.iter_commits(ref)]
     commit_messages = ['%s-1' % commit.subject for commit in commits]
     for msg in commit_messages:
         if msg not in repo_messages:
             return False
+    if repo_shas[0] != sha:
+        return False
     return True