Only add BUILD_TIMEOUT if there is a timeout

Change-Id: I60daa67e7154d2bf621305e0e0aa6f4db49033c1
This commit is contained in:
Monty Taylor 2017-09-28 15:10:39 -05:00
parent 85731f1291
commit ebf3e0ad07
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 3 additions and 2 deletions

View File

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