Title: [269248] trunk/Tools
Revision
269248
Author
[email protected]
Date
2020-11-02 08:59:27 -0800 (Mon, 02 Nov 2020)

Log Message

Only upload to S3 when running on ews-build.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=218439

Patch by Angelos Oikonomopoulos <[email protected]> on 2020-11-02
Reviewed by Aakash Jain.

Uploading to S3 is inconvenient for testing instances, so only run this
step if we're executing on ews-build.webkit.org. Otherwise, transfer the
file through the buildbot server.

Patch-by: [email protected]

* CISupport/ews-build/steps.py:
(TransferToS3.doStepIf):

Modified Paths

Diff

Modified: trunk/Tools/CISupport/ews-build/steps.py (269247 => 269248)


--- trunk/Tools/CISupport/ews-build/steps.py	2020-11-02 15:54:53 UTC (rev 269247)
+++ trunk/Tools/CISupport/ews-build/steps.py	2020-11-02 16:59:27 UTC (rev 269248)
@@ -33,14 +33,17 @@
 from send_email import send_email_to_patch_author, send_email_to_bot_watchers
 
 import json
+import os
 import re
 import requests
-import os
+import socket
 
 BUG_SERVER_URL = 'https://bugs.webkit.org/'
 S3URL = 'https://s3-us-west-2.amazonaws.com/'
 S3_RESULTS_URL = 'https://ews-build.s3-us-west-2.amazonaws.com/'
-EWS_BUILD_URL = 'https://ews-build.webkit.org/'
+CURRENT_HOSTNAME = socket.gethostname().strip()
+EWS_BUILD_HOSTNAME = 'ews-build.webkit.org'
+EWS_BUILD_URL = os.environ.get('EWS_BUILD_URL', 'https://{}/'.format(EWS_BUILD_HOSTNAME))
 EWS_URL = 'https://ews.webkit.org/'
 RESULTS_DB_URL = 'https://results.webkit.org/'
 WithProperties = properties.WithProperties
@@ -2404,6 +2407,9 @@
 
         return super(TransferToS3, self).finished(results)
 
+    def doStepIf(self, step):
+        return CURRENT_HOSTNAME == EWS_BUILD_HOSTNAME
+
     def hideStepIf(self, results, step):
         return results == SUCCESS and self.getProperty('sensitive', False)
 

Modified: trunk/Tools/ChangeLog (269247 => 269248)


--- trunk/Tools/ChangeLog	2020-11-02 15:54:53 UTC (rev 269247)
+++ trunk/Tools/ChangeLog	2020-11-02 16:59:27 UTC (rev 269248)
@@ -1,3 +1,19 @@
+2020-11-02  Angelos Oikonomopoulos  <[email protected]>
+
+        Only upload to S3 when running on ews-build.webkit.org
+        https://bugs.webkit.org/show_bug.cgi?id=218439
+
+        Reviewed by Aakash Jain.
+
+        Uploading to S3 is inconvenient for testing instances, so only run this
+        step if we're executing on ews-build.webkit.org. Otherwise, transfer the
+        file through the buildbot server.
+
+        Patch-by: [email protected]
+
+        * CISupport/ews-build/steps.py:
+        (TransferToS3.doStepIf):
+
 2020-11-01  Sam Weinig  <[email protected]>
 
         Remove remaining alternative preference setting mechanisms from LayoutTests
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to