mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-05-01 22:21:04 +08:00
Instantly fail component builds if we fail to submit them
- Fail builds if builder.build() does not return bool(value) == True Signed-off-by: Lubos Kocman <lkocman@redhat.com>
This commit is contained in:
@@ -71,6 +71,11 @@ def start_next_build_batch(module, session, builder, components=None):
|
||||
for c in unbuilt_components:
|
||||
c.batch = module.batch
|
||||
c.task_id = builder.build(artifact_name=c.package, source=c.scmurl)
|
||||
# Fail task if we failed to submit it to koji
|
||||
# This typically happens when koji auth failed
|
||||
if not c.task_id:
|
||||
c.state = koji.BUILD_STATES['FAILED']
|
||||
# TODO: set c.fail_reason to "Failed to submit build"
|
||||
|
||||
session.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user