]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
packageing: add force_noarch option support 1578/head
authorXiubo Li <xiubli@redhat.com>
Thu, 5 Nov 2020 03:25:23 +0000 (22:25 -0500)
committerXiubo Li <xiubli@redhat.com>
Tue, 1 Dec 2020 01:11:28 +0000 (09:11 +0800)
Add one "force_noarch : True" option to force to use the "noarch"
to build the uri, False as default.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
docs/detailed_test_config.rst
teuthology/packaging.py

index 50ae910a91f16313655fa732927898d5f59a0228..97ce7343da7465779163617ba84b5935d169f65c 100644 (file)
@@ -270,3 +270,15 @@ the location of the sandbox directory, the following option can be
 specified in ``$HOME/.teuthology.yaml``::
 
     test_path: <directory>
+
+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
index 11e29f1eb25a381fbdf6df0b50a5734b69ea3f0d..14a6082903e002b427dda031c93ff9d628af19f6 100644 (file)
@@ -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()