]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks/cephadm: allow to select from 'cephadm' and 'cephadm.py'
authorKyr Shatskyy <kyrylo.shatskyy@clyso.com>
Wed, 14 May 2025 14:25:15 +0000 (16:25 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@clyso.com>
Wed, 25 Jun 2025 15:10:55 +0000 (17:10 +0200)
After quincy the following releases of the src/cephadm/cephadm script
became  src/cephadm/cephadm.py, so just allow to select custom path.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
qa/tasks/cephadm.py

index f64744dabf77f34a41e693a338e97196f43856b9..695062a67f15b7a5238fe1502e486976e9b7b98a 100644 (file)
@@ -282,6 +282,7 @@ def _fetch_cephadm_from_rpm(ctx):
 def _fetch_cephadm_from_github(ctx, config, ref):
     ref = config.get('cephadm_branch', ref)
     git_url = config.get('cephadm_git_url', teuth_config.get_ceph_git_url())
+    file_path = config.get('cephadm_file_path', 'src/cephadm/cephadm')
     log.info('Downloading cephadm (repo %s ref %s)...' % (git_url, ref))
     if git_url.startswith('https://github.com/'):
         # git archive doesn't like https:// URLs, which we use with github.
@@ -290,7 +291,7 @@ def _fetch_cephadm_from_github(ctx, config, ref):
         ctx.cluster.run(
             args=[
                 'curl', '--silent',
-                'https://raw.githubusercontent.com/' + rest + '/' + ref + '/src/cephadm/cephadm',
+                f'https://raw.githubusercontent.com/{rest}/{ref}/{file_path}',
                 run.Raw('>'),
                 ctx.cephadm,
                 run.Raw('&&'),
@@ -305,7 +306,7 @@ def _fetch_cephadm_from_github(ctx, config, ref):
                 run.Raw('&&'),
                 'cd', 'testrepo',
                 run.Raw('&&'),
-                'git', 'show', f'{ref}:src/cephadm/cephadm',
+                'git', 'show', f'{ref}:{file_path}',
                 run.Raw('>'),
                 ctx.cephadm,
                 run.Raw('&&'),