From: Xiubo Li Date: Thu, 5 Nov 2020 03:25:23 +0000 (-0500) Subject: packageing: add force_noarch option support X-Git-Tag: 1.1.0~30^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=daaeaf55318e2ffe1c27e11f61733291c71decc9;p=teuthology.git packageing: add force_noarch option support Add one "force_noarch : True" option to force to use the "noarch" to build the uri, False as default. Signed-off-by: Xiubo Li --- diff --git a/docs/detailed_test_config.rst b/docs/detailed_test_config.rst index 50ae910a91..97ce7343da 100644 --- a/docs/detailed_test_config.rst +++ b/docs/detailed_test_config.rst @@ -270,3 +270,15 @@ the location of the sandbox directory, the following option can be specified in ``$HOME/.teuthology.yaml``:: test_path: + +Shaman options +============== + +Shaman is a helper class which could be used to build the uri for specified +packages based the 'shaman_host': 'shaman.ceph.com'. + +Options:: + + use_shaman: True # Enable to use Shaman, False as default + shaman: + force_noarch: True # Force to use "noarch" to build the uri diff --git a/teuthology/packaging.py b/teuthology/packaging.py index 11e29f1eb2..14a6082903 100644 --- a/teuthology/packaging.py +++ b/teuthology/packaging.py @@ -853,6 +853,9 @@ class ShamanProject(GitbuilderProject): super(ShamanProject, self).__init__(project, job_config, ctx, remote) self.query_url = 'https://%s/api/' % config.shaman_host + # Force to use the "noarch" instead to build the uri. + self.force_noarch = self.job_config.get("shaman", {}).get("force_noarch", False) + def _get_base_url(self): self.assert_result() return self._result.json()[0]['url'] @@ -882,7 +885,8 @@ class ShamanProject(GitbuilderProject): req_obj['status'] = 'ready' req_obj['project'] = self.project req_obj['flavor'] = flavor - req_obj['distros'] = '%s/%s' % (self.distro, self.arch) + arch = "noarch" if self.force_noarch else self.arch + req_obj['distros'] = '%s/%s' % (self.distro, arch) ref_name, ref_val = list(self._choose_reference().items())[0] if ref_name == 'tag': req_obj['sha1'] = self._sha1 = self._tag_to_sha1()