Add Zuul's event id to Ansible inventory
With the event id in the inventory we can use it in the emit-job-header role. This can aid in debugging, e.g. when a job is still running. Change-Id: Id2d38bb3d121fa9cf959b9765ac8025d42001c02
This commit is contained in:
@@ -309,6 +309,11 @@ of item.
|
||||
|
||||
The name of the job being run.
|
||||
|
||||
.. var:: event_id
|
||||
|
||||
The UUID of the event that triggered this execution. This is mainly
|
||||
useful for debugging purposes.
|
||||
|
||||
.. var:: voting
|
||||
|
||||
A boolean indicating whether the job is voting.
|
||||
|
||||
@@ -78,6 +78,7 @@ class TestInventoryGithub(TestInventoryBase):
|
||||
self.assertIn('executor', z_vars)
|
||||
self.assertIn('src_root', z_vars['executor'])
|
||||
self.assertIn('job', z_vars)
|
||||
self.assertIn('event_id', z_vars)
|
||||
self.assertEqual(z_vars['job'], 'single-inventory')
|
||||
self.assertEqual(z_vars['message'], 'QQ==')
|
||||
self.assertEqual(z_vars['change_url'],
|
||||
|
||||
@@ -165,6 +165,7 @@ class ExecutorClient(object):
|
||||
project=project,
|
||||
tenant=tenant.name,
|
||||
timeout=job.timeout,
|
||||
event_id=item.event.zuul_event_id,
|
||||
jobtags=sorted(job.tags),
|
||||
_inheritance_path=list(job.inheritance_path))
|
||||
if job.artifact_data:
|
||||
|
||||
Reference in New Issue
Block a user