From: Loic Dachary Date: Tue, 20 Oct 2015 00:03:10 +0000 (+0200) Subject: suite: use get_ceph_*_url when checking branches X-Git-Tag: 1.1.0~772^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=23beb6ce15ec834452531c1203a451971e320113;p=teuthology.git suite: use get_ceph_*_url when checking branches Otherwise the check is always done on the default http://github.com/ceph/xxx Signed-off-by: Loic Dachary --- diff --git a/teuthology/suite.py b/teuthology/suite.py index df0ba60f8c..8c2b82cf15 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -8,6 +8,7 @@ import logging import os import requests import pwd +import re import subprocess import smtplib import socket @@ -468,7 +469,13 @@ def github_branch_exists(project, branch, project_owner='ceph'): """ Query GitHub to check the existence of a project's branch """ - url_templ = 'https://github.com/{project_owner}/{project}/tree/{branch}' + if project == 'ceph-qa-suite': + base = config.get_ceph_qa_suite_git_url() + elif project == 'ceph': + base = config.get_ceph_git_url() + else: + base = 'https://github.com/{project_owner}/{project}' + url_templ = re.sub('\.git$', '', base) + '/tree/{branch}' url = url_templ.format(project_owner=project_owner, project=project, branch=branch) resp = requests.head(url)