Ejemplo n.º 1
0
def find_decision_task_id(repo_url, project, revision, product):
    trust_domain = get_trust_domain(repo_url, project, product)
    if trust_domain.endswith("mobile"):
        _, project = extract_github_repo_owner_and_name(repo_url)

    decision_task_route = f"{trust_domain}.v2.{project}.revision.{revision}.taskgraph.decision"
    index = get_service("index")
    return index.findTask(decision_task_route)["taskId"]
Ejemplo n.º 2
0
def find_decision_task_id(repo_url, project, revision, product):
    trust_domain = get_trust_domain(repo_url, project, product)
    if trust_domain.endswith("mobile"):
        # XXX "project" is a gecko-centric term which is translated into a branch in the git world.
        branch = project
        _, repo_name = extract_github_repo_owner_and_name(repo_url)
        decision_task_route = f"{trust_domain}.v2.{repo_name}.branch.{branch}.revision.{revision}.taskgraph.decision"
    else:
        decision_task_route = f"{trust_domain}.v2.{project}.revision.{revision}.taskgraph.decision"
    index = get_service("index")
    return index.findTask(decision_task_route)["taskId"]
Ejemplo n.º 3
0
def get_trust_domain(repo_url, project, product):
    if product == "fenix":
        repo_owner, _ = extract_github_repo_owner_and_name(repo_url)
        if repo_owner == "mozilla-mobile":
            return "project.mobile.fenix"
        else:
            return "garbage.project.mobile.fenix"
    elif "comm" in project:
        return "comm"
    elif "xpi" in project:
        return "xpi"
    else:
        return "gecko"
Ejemplo n.º 4
0
def get_trust_domain(repo_url, project, product):
    if is_github_url(repo_url):
        repo_owner, repo_name = extract_github_repo_owner_and_name(repo_url)
        if repo_owner == "mozilla-mobile" or repo_name in SUPPORTED_MOBILE_REPO_NAMES:
            return "mobile"
        else:
            raise UnsupportedFlavor(f'Unable to know what to do with repo_owner "{repo_owner}" and repo_name "{repo_name}"')
    elif "comm" in project:
        return "comm"
    elif "xpi" in project:
        return "xpi"
    else:
        return "gecko"
Ejemplo n.º 5
0
def get_trust_domain(repo_url, project, product):
    if is_github_url(repo_url):
        repo_owner, repo_name = extract_github_repo_owner_and_name(repo_url)
        if repo_owner == "mozilla-mobile":
            return "mobile"
        elif repo_name in SUPPORTED_MOBILE_REPO_NAMES:
            # fenix forks don't pollute the mobile namespace, for instance
            return "garbage.mobile"
        else:
            raise UnsupportedFlavor(
                'Unable to know what to do with repo_owner "{repo_owner}" and repo_name "{repo_name}"'
            )
    elif "comm" in project:
        return "comm"
    elif "xpi" in project:
        return "xpi"
    else:
        return "gecko"