Skip to content

Commit

Permalink
Merge ee1a629 into 4bfe2b8
Browse files Browse the repository at this point in the history
  • Loading branch information
chmeliik committed May 14, 2019
2 parents 4bfe2b8 + ee1a629 commit 57ae263
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 1,351 deletions.
35 changes: 1 addition & 34 deletions osbs/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ def validate_arrangement_version(arrangement_version):
return

if arrangement_version <= 5:
# TODO: raise as ValueError in release 0.54+
logger.warning("arrangement_version <= 5 is deprecated and will be removed"
" in release 0.54")
raise ValueError('arrangement_version <= 5 is no longer supported')


class OSBS(object):
Expand Down Expand Up @@ -761,37 +759,6 @@ def _do_create_prod_build(self, git_uri, git_ref,
logger.debug(response.json)
return response

@osbsapi
def create_prod_build(self, *args, **kwargs):
"""
Create a production build
:param git_uri: str, URI of git repository
:param git_ref: str, reference to commit
:param git_branch: str, branch name
:param user: str, user name
:param component: str, not used anymore
:param target: str, koji target
:param architecture: str, build architecture
:param yum_repourls: list, URLs for yum repos
:param koji_task_id: int, koji task ID requesting build
:param scratch: bool, this is a scratch build
:param platform: str, the platform name
:param platforms: list<str>, the name of each platform
:param release: str, the release value to use
:param inner_template: str, name of inner template for BuildRequest
:param outer_template: str, name of outer template for BuildRequest
:param customize_conf: str, name of customization config for BuildRequest
:param arrangement_version: int, numbered arrangement of plugins for orchestration workflow
:param signing_intent: str, signing intent of the ODCS composes
:param compose_ids: list<int>, ODCS composes used
:return: BuildResponse instance
"""
logger.warning("prod (all-in-one) builds are deprecated, "
"please use create_orchestrator_build "
"(support will be removed in version 0.54)")
return self._do_create_prod_build(*args, **kwargs)

@osbsapi
def create_build(self, **kwargs):
"""
Expand Down
8 changes: 2 additions & 6 deletions osbs/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,8 @@ def cmd_cancel_build(args, osbs):
def cmd_build(args, osbs):
if args.worker:
create_func = osbs.create_worker_build
elif args.orchestrator:
create_func = osbs.create_orchestrator_build
else:
create_func = osbs.create_prod_build
create_func = osbs.create_orchestrator_build

build_kwargs = {
'git_uri': osbs.build_conf.get_git_uri(),
Expand Down Expand Up @@ -719,9 +717,7 @@ def cli():
build_type_group.add_argument("--worker", action="store_true", required=False,
default=False, help="create worker build")
build_type_group.add_argument("--orchestrator", action="store_true", required=False,
default=False, help="create orchestrator build")
build_type_group.add_argument("--prod", action="store_true", required=False,
default=True, help="create prod build")
default=True, help="create orchestrator build")

group = build_parser.add_mutually_exclusive_group()
group.add_argument("--build-from", action='store', required=False,
Expand Down
Loading

0 comments on commit 57ae263

Please sign in to comment.