]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite/run.py: provide teuthology hash along with branch 1398/head
authorNathan Cutler <ncutler@suse.com>
Fri, 17 Jan 2020 21:36:21 +0000 (22:36 +0100)
committerNathan Cutler <ncutler@suse.com>
Fri, 17 Jan 2020 21:36:21 +0000 (22:36 +0100)
When running teuthology-suite with -t option, I see:

teuthology branch: wip-fix-opensuse-provisioning
ceph branch: wip-foo eb2fd5065c6e489ca8dd9282ba62ab231f144f7a

In other words, the ceph branch message has the SHA1 but the
teuthology branch message does not. This commit adds it.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
teuthology/suite/run.py

index f5ca1c1984477572a61e78acdc12a08314e87811..4aa3cf2ada5cb957261aeea41baaa7414d18adbf 100644 (file)
@@ -15,6 +15,7 @@ from teuthology.exceptions import (
 )
 from teuthology.misc import deep_merge, get_results_url
 from teuthology.orchestra.opsys import OS
+from teuthology.repo_utils import build_git_url
 
 from teuthology.suite import util
 from teuthology.suite.build_matrix import combine_path, build_matrix
@@ -206,7 +207,14 @@ class Run(object):
                     "branch {0} not in teuthology.git; will use master for"
                     " teuthology".format(self.args.ceph_branch))
                 teuthology_branch = 'master'
-        log.info("teuthology branch: %s", teuthology_branch)
+        teuthology_hash = util.git_ls_remote(
+            'teuthology',
+            teuthology_branch
+        )
+        if not teuthology_hash:
+            exc = BranchNotFoundError(teuthology_branch, build_git_url('teuthology'))
+            util.schedule_fail(message=str(exc), name=self.name)
+        log.info("teuthology branch: %s %s", teuthology_branch, teuthology_hash)
         return teuthology_branch
 
     @property