From 0cc14f5ce3a5a7568ef15983037551774df75537 Mon Sep 17 00:00:00 2001 From: Robert Cerven Date: Sep 10 2019 12:36:06 +0000 Subject: Skip build option for container-build, to update just buildconfig for autorebuilds * OSBS-7711 Signed-off-by: Robert Cerven --- diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py index eaaa93b..6b584ae 100644 --- a/pyrpkg/cli.py +++ b/pyrpkg/cli.py @@ -1564,6 +1564,11 @@ see API KEY section of copr-cli(1) man page. default=False, help="Don't check if there's a valid gating.yaml file in the repo") + parser.add_argument( + '--skip-build', + help="Don't create build, but just modify settings for autorebuilds", + action="store_true") + def register_container_build(self): self.container_build_parser = self.subparsers.add_parser( 'container-build', @@ -1982,7 +1987,8 @@ see API KEY section of copr-cli(1) man page. "quiet": self.args.q, "release": self.args.build_release, "git_branch": self.cmd.branch_merge, - "arches": self.args.arches} + "arches": self.args.arches, + "skip_build": self.args.skip_build} if not flatpak: if self.args.compose_ids and (self.args.repo_url or self.args.signing_intent): diff --git a/tests/test_cli.py b/tests/test_cli.py index 70cb1df..ae87030 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -228,7 +228,8 @@ class TestContainerBuildWithKoji(CliTestCase): 'git_branch': 'eng-rhel-7', 'arches': None, 'signing_intent': None, - 'compose_ids': None + 'compose_ids': None, + 'skip_build': False }, kojiconfig=None, kojiprofile='koji', @@ -257,7 +258,8 @@ class TestContainerBuildWithKoji(CliTestCase): 'git_branch': 'eng-rhel-7', 'arches': None, 'signing_intent': None, - 'compose_ids': None + 'compose_ids': None, + 'skip_build': False }, kojiconfig=None, kojiprofile='koji', @@ -295,7 +297,8 @@ class TestContainerBuildWithKoji(CliTestCase): 'git_branch': 'eng-rhel-7', 'arches': None, 'signing_intent': None, - 'compose_ids': None + 'compose_ids': None, + 'skip_build': False }, kojiconfig='/path/to/koji.conf', kojiprofile=None, @@ -349,6 +352,7 @@ class TestContainerBuildWithKoji(CliTestCase): 'release': None, 'git_branch': 'eng-rhel-7', 'arches': None, + 'skip_build': False }, kojiconfig=None, kojiprofile='koji',