Browse Source

Add zuul version to status.json

It'll help us to determine whether we're running a version of zuul that has
added support for some new feature.

The version_string() from pbr's version_info used to collect zuul version.

Change-Id: Id451f15538258ab2dec8e3e8f000cff4a8b7b20d
changes/09/64209/2
Sergey Lukjanov 9 years ago
parent
commit
5ba961bcc8
  1. 6
      zuul/scheduler.py

6
zuul/scheduler.py

@ -31,6 +31,7 @@ import layoutvalidator
import model
from model import ActionReporter, Pipeline, Project, ChangeQueue, EventFilter
import merger
from zuul import version as zuul_version
statsd = extras.try_import('statsd.statsd')
@ -130,6 +131,8 @@ class Scheduler(threading.Thread):
self.management_event_queue = Queue.Queue()
self.layout = model.Layout()
self.zuul_version = zuul_version.version_info.version_string()
def stop(self):
self._stopped = True
self.wake_event.set()
@ -761,6 +764,9 @@ class Scheduler(threading.Thread):
def formatStatusJSON(self):
data = {}
data['zuul_version'] = self.zuul_version
if self._pause:
ret = '<p><b>Queue only mode:</b> preparing to '
if self._exit:

Loading…
Cancel
Save