Remove ZUUL_CHANGE
Removing old ZUUL_ env variables which have been replaced with Ansible variables. While we're at it, ensure that zuul.change and zuul.patchset are both rendered to Ansible as strings so that we don't build any unecessary assumptions about the type of those values. Change-Id: I3de53c58ac2c5a35547e22a79b8b42558610284a
This commit is contained in:
parent
ee9c8c6cba
commit
e3db295493
|
@ -36,8 +36,6 @@ class TestGithubDriver(ZuulTestCase):
|
|||
|
||||
build_params = self.builds[0].parameters
|
||||
self.assertEqual('master', build_params['ZUUL_BRANCH'])
|
||||
self.assertEqual(str(A.number), build_params['ZUUL_CHANGE'])
|
||||
self.assertEqual(A.head_sha, build_params['zuul']['patchset'])
|
||||
|
||||
self.executor_server.hold_jobs_in_build = False
|
||||
self.executor_server.release()
|
||||
|
@ -50,8 +48,8 @@ class TestGithubDriver(ZuulTestCase):
|
|||
|
||||
job = self.getJobFromHistory('project-test2')
|
||||
zuulvars = job.parameters['zuul']
|
||||
self.assertEqual(A.number, zuulvars['change'])
|
||||
self.assertEqual(A.head_sha, zuulvars['patchset'])
|
||||
self.assertEqual(str(A.number), zuulvars['change'])
|
||||
self.assertEqual(str(A.head_sha), zuulvars['patchset'])
|
||||
self.assertEqual(1, len(A.comments))
|
||||
self.assertEqual(2, len(self.history))
|
||||
|
||||
|
|
|
@ -1283,7 +1283,7 @@ class TestScheduler(ZuulTestCase):
|
|||
|
||||
self.executor_server.hold_jobs_in_build = False
|
||||
for build in self.builds:
|
||||
if build.parameters['ZUUL_CHANGE'] != '1':
|
||||
if build.parameters['zuul']['change'] != '1':
|
||||
build.release()
|
||||
self.waitUntilSettled()
|
||||
|
||||
|
@ -2035,13 +2035,13 @@ class TestScheduler(ZuulTestCase):
|
|||
|
||||
a_build = b_build = c_build = d_build = None
|
||||
for x in self.builds:
|
||||
if x.parameters['ZUUL_CHANGE'] == '3':
|
||||
if x.parameters['zuul']['change'] == '3':
|
||||
a_build = x
|
||||
elif x.parameters['ZUUL_CHANGE'] == '4':
|
||||
elif x.parameters['zuul']['change'] == '4':
|
||||
b_build = x
|
||||
elif x.parameters['ZUUL_CHANGE'] == '5':
|
||||
elif x.parameters['zuul']['change'] == '5':
|
||||
c_build = x
|
||||
elif x.parameters['ZUUL_CHANGE'] == '6':
|
||||
elif x.parameters['zuul']['change'] == '6':
|
||||
d_build = x
|
||||
if a_build and b_build and c_build and d_build:
|
||||
break
|
||||
|
|
|
@ -168,9 +168,9 @@ class ExecutorClient(object):
|
|||
if hasattr(item.change, 'tag'):
|
||||
zuul_params['tag'] = item.change.tag
|
||||
if hasattr(item.change, 'number'):
|
||||
zuul_params['change'] = item.change.number
|
||||
zuul_params['change'] = str(item.change.number)
|
||||
if hasattr(item.change, 'patchset'):
|
||||
zuul_params['patchset'] = item.change.patchset
|
||||
zuul_params['patchset'] = str(item.change.patchset)
|
||||
if hasattr(item.change, 'oldrev') and item.change.oldrev:
|
||||
zuul_params['oldrev'] = item.change.oldrev
|
||||
if hasattr(item.change, 'newrev') and item.change.newrev:
|
||||
|
@ -208,7 +208,6 @@ class ExecutorClient(object):
|
|||
i.change.patchset)
|
||||
for i in all_items])
|
||||
params['ZUUL_CHANGE_IDS'] = zuul_changes
|
||||
params['ZUUL_CHANGE'] = str(item.change.number)
|
||||
|
||||
params['job'] = job.name
|
||||
params['timeout'] = job.timeout
|
||||
|
|
Loading…
Reference in New Issue