Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2993)

Unified Diff: build/android/buildbot/bb_device_status_check.py

Issue 521823003: Added mailing list for device alerts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CC Mailing List so GUTS can CC. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot/bb_device_status_check.py
diff --git a/build/android/buildbot/bb_device_status_check.py b/build/android/buildbot/bb_device_status_check.py
index fe40488d8f0110bbfd3ff5cb261f9bde06115d67..2eb3626a9d3ca9b13bb8a57a81979da2df9b053e 100755
--- a/build/android/buildbot/bb_device_status_check.py
+++ b/build/android/buildbot/bb_device_status_check.py
@@ -149,14 +149,16 @@ def CheckForMissingDevices(options, adb_online_devs):
bb_annotations.PrintSummaryText(devices_missing_msg)
from_address = 'chrome-bot@chromium.org'
- to_addresses = ['chrome-labs-tech-ticket@google.com']
+ to_addresses = ['chrome-labs-tech-ticket@google.com',
+ 'chrome-android-device-alert@google.com']
friedman 2014/09/03 21:42:24 Do you have to have it in the To address as well a
+ cc_addresses = ['chrome-android-device-alert@google.com']
subject = 'Devices offline on %s, %s, %s' % (
os.environ.get('BUILDBOT_SLAVENAME'),
os.environ.get('BUILDBOT_BUILDERNAME'),
os.environ.get('BUILDBOT_BUILDNUMBER'))
msg = ('Please reboot the following devices:\n%s' %
'\n'.join(map(str,new_missing_devs)))
- SendEmail(from_address, to_addresses, subject, msg)
+ SendEmail(from_address, to_addresses, cc_addresses, subject, msg)
all_known_devices = list(set(adb_online_devs) | set(last_devices))
device_list.WritePersistentDeviceList(last_devices_path, all_known_devices)
@@ -198,9 +200,10 @@ def CheckForMissingDevices(options, adb_online_devs):
'regularly scheduled program.' % list(new_devs))
-def SendEmail(from_address, to_addresses, subject, msg):
+def SendEmail(from_address, to_addresses, cc_addresses, subject, msg):
msg_body = '\r\n'.join(['From: %s' % from_address,
'To: %s' % ', '.join(to_addresses),
+ 'CC: %s' % ', '.join(cc_addresses),
'Subject: %s' % subject, '', msg])
try:
server = smtplib.SMTP('localhost')
@@ -351,7 +354,7 @@ def main():
bot_name = os.environ.get('BUILDBOT_BUILDERNAME')
slave_name = os.environ.get('BUILDBOT_SLAVENAME')
subject = 'Device status check errors on %s, %s.' % (slave_name, bot_name)
- SendEmail(from_address, to_addresses, subject, msg)
+ SendEmail(from_address, to_addresses, [], subject, msg)
if options.device_status_dashboard:
perf_tests_results_helper.PrintPerfResult('BotDevices', 'OnlineDevices',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698