[ews-build] Use PostgreSQL for ews-build database
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 18:20:22 +0000 (18:20 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 18:20:22 +0000 (18:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196229

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/master.cfg:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243509 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-build/master.cfg
Tools/ChangeLog

index d5b755f..d6a89d3 100644 (file)
@@ -20,10 +20,23 @@ c['protocols'] = {'pb': {'port': 17000}}
 
 c['projectName'] = 'WebKit EWS'
 c['projectURL'] = 'https://ews-build.webkit.org/'
-c['buildbotURL'] = 'https://ews-build.webkit.org/'
 
-c['logCompressionMethod'] = 'lz4'
+if is_test_mode_enabled:
+    c['buildbotURL'] = 'http://localhost:8010/'
+    c['db_url'] = 'sqlite:///state.sqlite?serialize_access=1'
+else:
+    c['buildbotURL'] = 'https://ews-build.webkit.org/'
+    db_url = os.getenv('DB_URL', None)
+    db_name = os.getenv('DB_NAME', None)
+    db_username = os.getenv('DB_USERNAME', None)
+    db_password = os.getenv('DB_PASSWORD', None)
+    if None in [db_url, db_name, db_username, db_password]:
+        print('Environment variables for DB not found. Please ensure these variables are set.')
+        sys.exit(1)
+    # See https://docs.buildbot.net/1.7.0/manual/configuration/global.html#database-specification
+    c['db_url'] = 'postgresql://{}:{}@{}/{}'.format(db_username, db_password, db_url, db_name)
 
+c['logCompressionMethod'] = 'lz4'
 c['buildbotNetUsageData'] = None
 
 loadConfig.loadBuilderConfig(c, is_test_mode_enabled=is_test_mode_enabled)
index cc5ae56..5fbbb36 100644 (file)
@@ -1,5 +1,14 @@
 2019-03-26  Aakash Jain  <aakash_jain@apple.com>
 
+        [ews-build] Use PostgreSQL for ews-build database
+        https://bugs.webkit.org/show_bug.cgi?id=196229
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-build/master.cfg:
+
+2019-03-26  Aakash Jain  <aakash_jain@apple.com>
+
         [ews-build] Get master_hostname dynamically in master.cfg
         https://bugs.webkit.org/show_bug.cgi?id=196255