Set BUILD_TIMEOUT environment variable in zuul_legacy_vars

Jobs that need this expect it as an environment variable.

Update the migration script in case it gets used again.

Change-Id: Ic4d372a795e17a33116d19e9e4603fb5a08fe152
This commit is contained in:
Monty Taylor 2017-09-28 13:22:52 -05:00
parent ac1155d2b1
commit 85731f1291
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
2 changed files with 2 additions and 3 deletions

View File

@ -25,7 +25,8 @@ def zuul_legacy_vars(zuul):
ZUUL_SHORT_PROJECT_NAME=short_name,
ZUUL_PIPELINE=zuul['pipeline'],
ZUUL_VOTING=zuul['voting'],
WORKSPACE='/home/zuul/workspace')
WORKSPACE='/home/zuul/workspace',
BUILD_TIMEOUT=str(int(zuul['timeout']) * 1000))
if 'branch' in zuul:
params['ZUUL_BRANCH'] = zuul['branch']

View File

@ -932,8 +932,6 @@ class Job:
timeout = self.getTimeout()
if timeout:
output['timeout'] = timeout
output.setdefault('vars', {})
output['vars']['BUILD_TIMEOUT'] = str(timeout * 1000)
if self.nodes:
if len(self.nodes) == 1: