Merge "Fail jobs when requirements not met"
This commit is contained in:
commit
99c6617454
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Jobs which use the :attr:`job.requires` attribute and fail to have
|
||||
their requirements met are now recorded as "FAILED" rather than
|
||||
"SKIPPED". This can happen if an earlier job which is expected to
|
||||
produce artifacts fails to do so due to an error.
|
|
@ -5596,7 +5596,7 @@ class TestProvidesRequires(ZuulDBTestCase):
|
|||
dict(name='hold', result='SUCCESS', changes='1,1'),
|
||||
dict(name='hold', result='SUCCESS', changes='1,1 2,1'),
|
||||
], ordered=False)
|
||||
self.assertIn('image-user : SKIPPED', B.messages[0])
|
||||
self.assertIn('image-user : FAILED', B.messages[0])
|
||||
self.assertIn('not met by build', B.messages[0])
|
||||
|
||||
|
||||
|
|
|
@ -2365,7 +2365,7 @@ class QueueItem(object):
|
|||
except RequirementsError as e:
|
||||
self.warning(str(e))
|
||||
fakebuild = Build(job, None)
|
||||
fakebuild.result = 'SKIPPED'
|
||||
fakebuild.result = 'FAILED'
|
||||
self.addBuild(fakebuild)
|
||||
ret = True
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue