Skip to content

Commit

Permalink
pass default and max build times from osbs.conf via kwargs to
Browse files Browse the repository at this point in the history
create_binary_container_build

* CLOUDBLD-9913

Signed-off-by: Robert Cerven <[email protected]>
  • Loading branch information
rcerven committed Dec 15, 2022
1 parent 1b6c1c6 commit 17665df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions koji_containerbuild/plugins/builder_containerbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,11 @@ def createContainer(self, src=None, target_info=None, arches=None,
if release:
create_build_args['release'] = release

create_build_args['default_buildtime_limit'] =\
self.osbs().os_conf.get_default_buildtime_limit()
create_build_args['max_buildtime_limit'] =\
self.osbs().os_conf.get_max_buildtime_limit()

try:
create_method = self.osbs().create_binary_container_build
self.logger.debug("Starting %s with params: '%s",
Expand Down
4 changes: 4 additions & 0 deletions tests/test_builder_containerbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ def _mock_osbs(self, koji_build_id, src, koji_task_id, source=False,
if not create_build_args.get('userdata'):
create_build_args.pop('userdata', None)

if not source:
create_build_args['default_buildtime_limit'] = 10800
create_build_args['max_buildtime_limit'] = 21600

if source:
(flexmock(osbs.api.OSBS)
.should_receive('create_source_container_build')
Expand Down

0 comments on commit 17665df

Please sign in to comment.