From: Michael Tremer Date: Fri, 5 May 2023 07:43:14 +0000 (+0000) Subject: client: Add switch to disable test builds X-Git-Tag: 0.9.29~161 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62d5a42fce1ae20befe929248842c5e7a06bee07;p=people%2Fms%2Fpakfire.git client: Add switch to disable test builds Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/hub.py b/src/pakfire/hub.py index cc519f919..00df9401b 100644 --- a/src/pakfire/hub.py +++ b/src/pakfire/hub.py @@ -248,7 +248,8 @@ class Hub(object): def get_build(self, uuid): return self._request("/api/v1/builds/%s" % uuid, decode="json") - async def build(self, path, repo=None, arches=None): + async def build(self, path, repo=None, arches=None, + disable_test_builds=False): """ Create a new build on the hub """ @@ -259,7 +260,11 @@ class Hub(object): # Create a new build build_id = await self._request("POST", "/api/v1/builds", - upload_id=upload_id, repo=repo, arches=arches) + upload_id=upload_id, + repo=repo, + arches=arches, + disable_test_builds=disable_test_builds, + ) log.debug("Build creates as %s" % build_id) diff --git a/src/scripts/pakfire-client.in b/src/scripts/pakfire-client.in index 2441d1b26..0df520205 100644 --- a/src/scripts/pakfire-client.in +++ b/src/scripts/pakfire-client.in @@ -49,6 +49,8 @@ class Cli(object): help=_("Build the package(s) for the given architecture only")) build.add_argument("--repo", help=_("Create the build in this repository")) + build.add_argument("--disable-test-builds", action="store_true", + help=_("No test builds will be created for this build")) build.set_defaults(func=self._build) # check-connection @@ -129,7 +131,8 @@ class Cli(object): # Build all packages for package in ns.packages: - await hub.build(package, arches=ns.arch, repo=ns.repo) + await hub.build(package, arches=ns.arch, repo=ns.repo, + disable_test_builds=ns.disable_test_builds) finally: tmp.cleanup()