Example #1
0
def sendMailRD(smtpServer, From, cfgFile, r):
    # Send an email to the mailing after the build
    contentMail = ""
    release_config = readReleaseConfig(cfgFile)
    sources = release_config['sourceRepositories']
    To = release_config['ImportantRecipients']
    comment = r.get("comment")

    if comment:
        contentMail += "Comment:\n" + comment + "\n\n"

    contentMail += "A new build has been submitted through ship-it:\n"

    for name, source in sources.items():

        # We cannot use the source["revision"] value because it has not been
        # updated yet. It is done later in the process.
        # Select the one defined
        if name == "comm":
            # Thunderbird
            revision = r["commRevision"]
        else:
            revision = r["mozillaRevision"]

        # For now, firefox has only one source repo but Thunderbird has two
        contentMail += name + " commit: https://hg.mozilla.org/" + source['path'] + "/rev/" + revision + "\n"

    contentMail += "\nCreated by " + r["submitter"] + "\n"

    contentMail += "\nStarted by " + r["starter"] + "\n"

    Subject = 'Build of %s' % r["name"]

    sendmail(from_=From, to=To, subject=Subject, body=contentMail,
             smtp_server=smtpServer)
Example #2
0
def email_release_drivers(smtp_server, from_, to, release, graph_id):
    # Send an email to the mailing after the build

    content = """\
A new build has been submitted through ship-it:

Commit: https://hg.mozilla.org/{path}/rev/{revision}
Task graph: https://tools.taskcluster.net/task-graph-inspector/#{task_graph_id}/

Created by {submitter}
Started by {starter}


""".format(path=release["branch"], revision=release["mozillaRevision"],
           submitter=release["submitter"], starter=release["starter"],
           task_graph_id=graph_id)

    comment = release.get("comment")
    if comment:
        content += "Comment:\n" + comment + "\n\n"

    # On r-d, we prefix the subject of the email in order to simplify filtering
    if "Fennec" in release["name"]:
        subject_prefix = "[mobile] "
    if "Firefox" in release["name"]:
        subject_prefix = "[desktop] "

    subject = subject_prefix + 'Build of %s' % release["name"]

    sendmail(from_=from_, to=to, subject=subject, body=content,
             smtp_server=smtp_server)
Example #3
0
def email_release_drivers(smtp_server, from_, to, release, task_group_id, l10n_url):
    # Send an email to the mailing after the build
    email_buglist_string = create_bugs_url(release)

    content = """\
A new build has been submitted through ship-it:

Commit: https://hg.mozilla.org/{path}/rev/{revision}
Task group: https://tools.taskcluster.net/push-inspector/#/{task_group_id}
Locales: {l10n_url} (requires VPN access)

Created by {submitter}
Started by {starter}

{email_buglist_string}
""".format(path=release["branch"], revision=release["mozillaRevision"],
           submitter=release["submitter"], starter=release["starter"],
           task_group_id=task_group_id, l10n_url=l10n_url,
           email_buglist_string=email_buglist_string)

    comment = release.get("comment")
    if comment:
        content += "Comment:\n" + comment + "\n\n"

    # On r-d, we prefix the subject of the email in order to simplify filtering
    subject_prefix = ""
    if "Fennec" in release["name"]:
        subject_prefix = "[mobile] "
    if "Firefox" in release["name"] or "Devedition" in release["name"]:
        subject_prefix = "[desktop] "

    subject = subject_prefix + 'Build of %s' % release["name"]

    sendmail(from_=from_, to=to, subject=subject, body=content,
             smtp_server=smtp_server)
Example #4
0
def email_release_drivers(smtp_server, from_, to, release, task_group_id, l10n_url):
    # Send an email to the mailing after the build
    email_buglist_string = create_bugs_url(release)

    content = """\
A new build has been submitted through ship-it:

Commit: https://hg.mozilla.org/{path}/rev/{revision}
Task group: https://tools.taskcluster.net/push-inspector/#/{task_group_id}
Locales: {l10n_url} (requires VPN access)

Created by {submitter}
Started by {starter}

{email_buglist_string}
""".format(path=release["branch"], revision=release["mozillaRevision"],
           submitter=release["submitter"], starter=release["starter"],
           task_group_id=task_group_id, l10n_url=l10n_url,
           email_buglist_string=email_buglist_string)

    comment = release.get("comment")
    if comment:
        content += "Comment:\n" + comment + "\n\n"

    # On r-d, we prefix the subject of the email in order to simplify filtering
    subject_prefix = ""
    if "Fennec" in release["name"]:
        subject_prefix = "[mobile] "
    if "Firefox" in release["name"] or "Devedition" in release["name"]:
        subject_prefix = "[desktop] "

    subject = subject_prefix + 'Build of %s' % release["name"]

    sendmail(from_=from_, to=to, subject=subject, body=content,
             smtp_server=smtp_server)
Example #5
0
def sendMailRD(smtpServer, From, To, r):
    # Send an email to the mailing after the build
    contentMail = ""

    comment = r.get("comment")
    if comment is not None:
        contentMail += "Comment:\n" + comment + "\n\n"

    contentMail += "A new build has been submitted through ship-it:\n"

    contentMail += "Commit: https://hg.mozilla.org/" + r["branch"] + "/rev/" + r["mozillaRevision"] + "\n"

    contentMail += "\n" + r["submitter"] + "\n"

    Subject = 'Build of %s' % r["name"]

    sendmail(from_=From, to=To, subject=Subject, body=contentMail,
             smtp_server=smtpServer)
Example #6
0
def sendMailRD(smtpServer, From, cfgFile, r):
    # Send an email to the mailing after the build
    contentMail = ""
    release_config = readReleaseConfig(cfgFile)
    sources = release_config['sourceRepositories']
    To = release_config['ImportantRecipients']
    comment = r.get("comment")

    if comment:
        contentMail += "Comment:\n" + comment + "\n\n"

    contentMail += "A new build has been submitted through ship-it:\n"

    for name, source in sources.items():

        if name == "comm":
            # Thunderbird
            revision = source["revision"]
            path = source["path"]
        else:
            revision = source["revision"]
            path = source["path"]

        # For now, firefox has only one source repo but Thunderbird has two
        contentMail += name + " commit: https://hg.mozilla.org/" + path + "/rev/" + revision + "\n"

    contentMail += "\nCreated by " + r["submitter"] + "\n"

    contentMail += "\nStarted by " + r["starter"] + "\n"

    subjectPrefix = ""

    # On r-d, we prefix the subject of the email in order to simplify filtering
    # We don't do it for thunderbird
    if "Fennec" in r["name"]:
        subjectPrefix = "[mobile] "
    if "Firefox" in r["name"]:
        subjectPrefix = "[desktop] "

    Subject = subjectPrefix + 'Build of %s' % r["name"]

    sendmail(from_=From, to=To, subject=Subject, body=contentMail,
             smtp_server=smtpServer)
Example #7
0
def reconfig_warning(from_, to, smtp_server, rr, start_time, elapsed,
                     proc):
    """Called when the buildbot master reconfigs are taking a long time."""
    started = time.strftime("%a, %d %b %Y %H:%M:%S %Z",
                            time.localtime(start_time))
    subject = "[release-runner] WARNING: Reconfig exceeded %s" % elapsed
    body = textwrap.dedent("""
    A buildbot master reconfig started at %(start_time)s has been running for
    %(elapsed)d seconds without completing. If it has been longer than
    1,800 seconds, manual intervention is probably necessary.

    - release-runner""" % dict(start_time=started, elapsed=elapsed))
    try:
        for release in rr.new_releases:
            rr.update_status(
                release, "Waiting on reconfig for %s" % elapsed)
        sendmail(from_=from_, to=to, subject=subject, body=body,
                 smtp_server=smtp_server)
    except SMTPException:
        log.error("Cannot send email", exc_info=True)
Example #8
0
def reconfig_warning(from_, to, smtp_server, rr, start_time, elapsed, proc):
    """Called when the buildbot master reconfigs are taking a long time."""
    started = time.strftime("%a, %d %b %Y %H:%M:%S %Z",
                            time.localtime(start_time))
    subject = "[release-runner] WARNING: Reconfig exceeded %s" % elapsed
    body = textwrap.dedent("""
    A buildbot master reconfig started at %(start_time)s has been running for
    %(elapsed)d seconds without completing. If it has been longer than
    1,800 seconds, manual intervention is probably necessary.

    - release-runner""" % dict(start_time=started, elapsed=elapsed))
    try:
        for release in rr.new_releases:
            rr.update_status(release, "Waiting on reconfig for %s" % elapsed)
        sendmail(from_=from_,
                 to=to,
                 subject=subject,
                 body=body,
                 smtp_server=smtp_server)
    except SMTPException:
        log.error("Cannot send email", exc_info=True)
Example #9
0
def sendMailRD(smtpServer, From, cfgFile, r):
    # Send an email to the mailing after the build
    contentMail = ""
    release_config = readReleaseConfig(cfgFile)
    sources = release_config['sourceRepositories']
    To = release_config['ImportantRecipients']
    comment = r.get("comment")

    if comment:
        contentMail += "Comment:\n" + comment + "\n\n"

    contentMail += "A new build has been submitted through ship-it:\n"

    for name, source in sources.items():

        # We cannot use the source["revision"] value because it has not been
        # updated yet. It is done later in the process.
        # Select the one defined
        if name == "comm":
            # Thunderbird
            revision = r["commRevision"]
        else:
            revision = r["mozillaRevision"]

        # For now, firefox has only one source repo but Thunderbird has two
        contentMail += name + " commit: https://hg.mozilla.org/" + source[
            'path'] + "/rev/" + revision + "\n"

    contentMail += "\n" + r["submitter"] + "\n"

    Subject = 'Build of %s' % r["name"]

    sendmail(from_=From,
             to=To,
             subject=Subject,
             body=contentMail,
             smtp_server=smtpServer)
Example #10
0
def email_release_drivers(smtp_server, from_, to, release, graph_id):
    # Send an email to the mailing after the build

    content = """\
A new build has been submitted through ship-it:

Commit: https://hg.mozilla.org/{path}/rev/{revision}
Task graph: https://tools.taskcluster.net/task-graph-inspector/#{task_graph_id}/

Created by {submitter}
Started by {starter}


""".format(path=release["branch"],
           revision=release["mozillaRevision"],
           submitter=release["submitter"],
           starter=release["starter"],
           task_graph_id=graph_id)

    comment = release.get("comment")
    if comment:
        content += "Comment:\n" + comment + "\n\n"

    # On r-d, we prefix the subject of the email in order to simplify filtering
    if "Fennec" in release["name"]:
        subject_prefix = "[mobile] "
    if "Firefox" in release["name"]:
        subject_prefix = "[desktop] "

    subject = subject_prefix + 'Build of %s' % release["name"]

    sendmail(from_=from_,
             to=to,
             subject=subject,
             body=content,
             smtp_server=smtp_server)