From 23beb6ce15ec834452531c1203a451971e320113 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 20 Oct 2015 02:03:10 +0200 Subject: [PATCH] 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 --- teuthology/suite.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) -- 2.39.5