示例#1
0
def is_rc(product, version, partial_updates):
    gecko_version = parse_version(product, version)

    # Release candidates are only expected when the version number matches
    # the release pattern

    try:
        if not gecko_version.is_release or gecko_version.patch_number is not None:
            return False
    except AttributeError:
        # some versions (like MavenVersion) don't expose this attribute
        return False

    if SUPPORTED_FLAVORS.get(f"{product}_rc"):
        # could hard code "Thunderbird" condition here but
        # suspect it's better to use SUPPORTED_FLAVORS for a
        # configuration driven decision.
        return True

    # RC release types will enable beta-channel testing &
    # shipping. We need this for all "final" releases
    # and also any releases that include a beta as a partial.
    # The assumption that "shipping to beta channel" always
    # implies other RC behaviour is bound to break at some
    # point, but this works for now.
    if partial_updates:
        for partial_version in partial_updates:
            partial_gecko_version = parse_version(product, partial_version)
            if partial_gecko_version.is_beta:
                return True

    return False
示例#2
0
文件: release.py 项目: Callek/shipit
def is_rc(product, version, partial_updates):
    if not is_beta(version) and not is_esr(version):
        if is_final_release(version) or _is_fennec_rc_release(
                product, version):
            # version supports rc flavor
            # now validate that the product itself supports rc flavor
            if SUPPORTED_FLAVORS.get(f"{product}_rc"):
                # could hard code "Thunderbird" condition here but
                # suspect it's better to use SUPPORTED_FLAVORS for a
                # configuration driven decision.
                return True
        # RC release types will enable beta-channel testing &
        # shipping. We need this for all "final" releases
        # and also any releases that include a beta as a partial.
        # The assumption that "shipping to beta channel" always
        # implies other RC behaviour is bound to break at some
        # point, but this works for now.
        if partial_updates:
            for version in partial_updates:
                if is_beta(version):
                    return True
    return False
示例#3
0
}

AUTH0_AUTH_SCOPES = dict()

# releng signoff scopes
for product in ["firefox", "fenix", "fennec", "devedition"]:
    scopes = {
        f"add_release/{product}": GROUPS["firefox-signoff"],
        f"abandon_release/{product}": GROUPS["firefox-signoff"]
    }
    phases = []
    for flavor in [
            product, f"{product}_rc", f"{product}_release",
            f"{product}_release_rc", f"{product}_beta"
    ]:
        phases += [i["name"] for i in SUPPORTED_FLAVORS.get(flavor, [])]
    for phase in set(phases):
        scopes.update({
            f"schedule_phase/{product}/{phase}":
            GROUPS["firefox-signoff"],
            f"phase_signoff/{product}/{phase}":
            GROUPS["firefox-signoff"]
        })
    AUTH0_AUTH_SCOPES.update(scopes)

# Add scopes for enabling/disabling products
AUTH0_AUTH_SCOPES.update({
    "disable_product/firefox":
    GROUPS["firefox-signoff"],
    "disable_product/fennec":
    GROUPS["firefox-signoff"],