Add back timeout_var logic
We still need to setup our timeout-var environmental variable, otherwise devstack gate will fail to read BUILD_TIMEOUT and default jobs to 120min timeouts. Change-Id: Ieccba55eaab83074a409efdbb928b4a4fdfdecf7 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
280cd8d062
commit
7aaf5d2f76
|
@ -1341,15 +1341,19 @@ class NodeWorker(object):
|
|||
inventory.write('\n')
|
||||
|
||||
timeout = None
|
||||
timeout_var = None
|
||||
for wrapper in jjb_job.get('wrappers', []):
|
||||
if isinstance(wrapper, dict):
|
||||
build_timeout = wrapper.get('timeout')
|
||||
if isinstance(build_timeout, dict):
|
||||
timeout_var = build_timeout.get('timeout-var')
|
||||
timeout = build_timeout.get('timeout')
|
||||
if timeout is not None:
|
||||
timeout = int(timeout) * 60
|
||||
if not timeout:
|
||||
timeout = ANSIBLE_DEFAULT_TIMEOUT
|
||||
if timeout_var:
|
||||
parameters[timeout_var] = str(timeout * 1000)
|
||||
|
||||
with open(jobdir.vars, 'w') as vars_yaml:
|
||||
variables = dict(
|
||||
|
|
Loading…
Reference in New Issue