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/zuul/model.py b/zuul/model.py
index 79fdbfb..1398131 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -402,6 +402,7 @@
self.next_build_set = None
self.previous_build_set = None
self.ref = None
+ self.commit = None
self.unable_to_merge = False
def setConfiguration(self):
@@ -416,9 +417,6 @@
if not self.ref:
self.ref = 'Z' + uuid4().hex
- def getRef(self):
- return self.ref
-
def addBuild(self, build):
self.builds[build.job.name] = build
build.build_set = self