Log Message
[ews] Ensure that uat instance doesn't send emails https://bugs.webkit.org/show_bug.cgi?id=218227
Reviewed by Jonathan Bedard. * CISupport/ews-build/send_email.py:
Modified Paths
Diff
Modified: trunk/Tools/CISupport/ews-build/send_email.py (269105 => 269106)
--- trunk/Tools/CISupport/ews-build/send_email.py 2020-10-28 15:57:35 UTC (rev 269105)
+++ trunk/Tools/CISupport/ews-build/send_email.py 2020-10-28 16:17:10 UTC (rev 269106)
@@ -23,11 +23,14 @@
import json
import os
import smtplib
+import socket
from email.mime.text import MIMEText
is_test_mode_enabled = os.getenv('BUILDBOT_PRODUCTION') is None
+CURRENT_HOSTNAME = socket.gethostname().strip()
+EWS_BUILD_HOSTNAME = 'ews-build.webkit.org'
FROM_EMAIL = '[email protected]'
IGALIA_JSC_QUEUES_PATTERNS = ['armv7', 'mips', 'i386']
IGALIA_GTK_WPE_QUEUES_PATTERNS = ['gtk', 'wpe']
@@ -47,6 +50,9 @@
def send_email(to_emails, subject, text, reference=''):
if is_test_mode_enabled:
return
+ if CURRENT_HOSTNAME != EWS_BUILD_HOSTNAME:
+ # Only allow EWS production instance to send emails.
+ return
if not to_emails:
print('Error: skipping email since no recipient is specified')
return
Modified: trunk/Tools/ChangeLog (269105 => 269106)
--- trunk/Tools/ChangeLog 2020-10-28 15:57:35 UTC (rev 269105)
+++ trunk/Tools/ChangeLog 2020-10-28 16:17:10 UTC (rev 269106)
@@ -1,3 +1,12 @@
+2020-10-28 Aakash Jain <[email protected]>
+
+ [ews] Ensure that uat instance doesn't send emails
+ https://bugs.webkit.org/show_bug.cgi?id=218227
+
+ Reviewed by Jonathan Bedard.
+
+ * CISupport/ews-build/send_email.py:
+
2020-10-28 Sam Weinig <[email protected]>
[Testing] Remove requirement of adding new SPI for each preference that needs testing
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
