Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Bug 749151 Try server emails for try-comm-central include the wrong l…
Browse files Browse the repository at this point in the history
…inks. r=bhearsum
  • Loading branch information
Mark Banner committed Sep 10, 2012
1 parent 310a906 commit 8f7f80c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
23 changes: 14 additions & 9 deletions bin/try_mailer.py
Expand Up @@ -61,6 +61,11 @@ def makeTryMessage(build, log_url):
else:
raise ValueError("I don't know who did this build")

branch = props['branch']
tree = "Try"
if 'comm' in branch:
tree = "ThunderbirdTry"

if 'got_revision' in props:
revision = props['got_revision'][:12]
elif 'revision' in props:
Expand All @@ -76,23 +81,23 @@ def makeTryMessage(build, log_url):
result = build.getResults()

if result == SUCCESS:
subject = "Try submission %(revision)s" % locals()
subject = "%(tree)s submission %(revision)s" % locals()
result_msg = "was successfully completed"
elif result == WARNINGS:
subject = "Try submission %(revision)s - warnings" % locals()
subject = "%(tree)s submission %(revision)s - warnings" % locals()
result_msg = "completed with warnings"
elif result == EXCEPTION:
subject = "Try submission %(revision)s - errors" % locals()
subject = "%(tree)s submission %(revision)s - errors" % locals()
result_msg = "hit a buildbot exception"
elif result == FAILURE:
subject = "Try submission %(revision)s - errors" % locals()
subject = "%(tree)s submission %(revision)s - errors" % locals()
result_msg = "failed to complete"
else:
subject = "Try submission %(revision)s - errors" % locals()
subject = "%(tree)s submission %(revision)s - errors" % locals()
result_msg = "had unknown problem (%s)" % result

text = """\
Your Try Server %(task)s (%(revision)s) %(result_msg)s on builder %(builder)s.\n\n""" % locals()
Your %(tree)s Server %(task)s (%(revision)s) %(result_msg)s on builder %(builder)s.\n\n""" % locals()

if 'packageUrl' in props:
url = props['packageUrl'].replace('://stage', '://ftp')
Expand All @@ -112,12 +117,12 @@ def makeTryMessage(build, log_url):
log_url = log_url.replace('://stage', '://ftp')
text += "The full log for this %(task)s run is available at <a href=\"%(log_url)s\">%(log_url)s</a>.\n" % locals()
else:
text += "Please check <a href=\"https://tbpl.mozilla.org/?tree=Try&rev=%(revision)s\">Tinderbox Pushlog</a> for your logs.\n" % locals()
text += "Please check <a href=\"https://tbpl.mozilla.org/?tree=%(tree)s&rev=%(revision)s\">Tinderbox Pushlog</a> for your logs.\n" % locals()

text = re.sub("\n", "<br>\n", text)

headers = {"In-Reply-To": "<try-%(revision)s>" % locals(),
"References": "<try-%(revision)s>" % locals(),
headers = {"In-Reply-To": "<%(branch)s-%(revision)s>" % locals(),
"References": "<%(branch)s-%(revision)s>" % locals(),
}

return dict(
Expand Down
14 changes: 9 additions & 5 deletions status/generators.py
Expand Up @@ -4,16 +4,20 @@
def buildTryChangeMessage(change, packageDir):
got_revision = revision = change.revision[:12]
who = change.who
branch = change.branch
tree = "Try"
if 'comm' in branch:
tree = "ThunderbirdTry"
packageDir = packageDir % locals()
msgdict = {"type": "plain"}
msgdict['subject'] = "Try submission %(revision)s" % locals()
msgdict['headers'] = {"In-Reply-To": "<try-%(revision)s>" % locals(),
"References": "<try-%(revision)s>" % locals(),
msgdict['subject'] = "%(tree)s submission %(revision)s" % locals()
msgdict['headers'] = {"In-Reply-To": "<%(branch)s-%(revision)s>" % locals(),
"References": "<%(branch)s-%(revision)s>" % locals(),
}
msgdict["body"] = """\
Thanks for your try submission (http://hg.mozilla.org/try/pushloghtml?changeset=%(revision)s). It's the best!
Thanks for your try submission (http://hg.mozilla.org/%(branch)s/pushloghtml?changeset=%(revision)s). It's the best!
Watch https://tbpl.mozilla.org/?tree=Try&rev=%(revision)s for your results to come in.
Watch https://tbpl.mozilla.org/?tree=%(tree)s&rev=%(revision)s for your results to come in.
Builds and logs will be available at %(packageDir)s.
Expand Down

0 comments on commit 8f7f80c

Please sign in to comment.