mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-13 17:29:45 +08:00
GenericBuilder: Add a boolean 'succeeded' parameter to finalize
Previously MockModuleBuilder was checking the module state to see if
it should run a final createrepo, but since eafa93037f, finalize() is
called before changing the module state; add an explicit boolean to
GenericBuilder.finalize() to avoid worrying about ordering.
This commit is contained in:
@@ -542,11 +542,11 @@ class MockModuleBuilder(GenericBuilder):
|
||||
def repo_from_tag(cls, config, tag_name, arch):
|
||||
pass
|
||||
|
||||
def finalize(self):
|
||||
# If the state is "done", run one last createrepo, to include
|
||||
def finalize(self, succeeded=True):
|
||||
# For successful builds, do one last createrepo, to include
|
||||
# the module metadata. We don't want to do this for failed builds,
|
||||
# since that makes it impossible to retry a build manually.
|
||||
if self.module.state == models.BUILD_STATES["done"]:
|
||||
if succeeded:
|
||||
self._createrepo(include_module_yaml=True)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user