[ews-build] Configure buildbot try credentials in environment variables
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Apr 2019 21:09:18 +0000 (21:09 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Apr 2019 21:09:18 +0000 (21:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196501

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/loadConfig.py: Read credentials from environment variables.
* BuildSlaveSupport/ews-app/ews/common/buildbot.py: Rename BUILDBOT_PB_USERNAME to BUILDBOT_TRY_USERNAME.
* BuildSlaveSupport/ews-app/ews/config.py: Ditto.

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

Tools/BuildSlaveSupport/ews-app/ews/common/buildbot.py
Tools/BuildSlaveSupport/ews-app/ews/config.py
Tools/BuildSlaveSupport/ews-build/loadConfig.py
Tools/ChangeLog

index 1bd521e..9907228 100644 (file)
@@ -43,8 +43,8 @@ class Buildbot():
         command = ['buildbot', 'try',
                    '--connect=pb',
                    '--master={}:{}'.format(config.BUILDBOT_SERVER_HOST, config.BUILDBOT_SERVER_PORT),
-                   '--username={}'.format(config.BUILDBOT_PB_USERNAME),
-                   '--passwd={}'.format(config.BUILDBOT_PB_PASSWORD),
+                   '--username={}'.format(config.BUILDBOT_TRY_USERNAME),
+                   '--passwd={}'.format(config.BUILDBOT_TRY_PASSWORD),
                    '--diff={}'.format(patch_path),
                    '--repository=']
 
index a050b2a..f1b3448 100644 (file)
@@ -28,8 +28,8 @@ PATCH_FOLDER = '/tmp/'
 
 BUILDBOT_SERVER_HOST = 'ews-build.webkit.org'
 BUILDBOT_SERVER_PORT = '5555'
-BUILDBOT_PB_USERNAME = os.getenv('BUILDBOT_PB_USERNAME', 'sampleuser')
-BUILDBOT_PB_PASSWORD = os.getenv('BUILDBOT_PB_PASSWORD', 'samplepass')
+BUILDBOT_TRY_USERNAME = os.getenv('BUILDBOT_TRY_USERNAME', 'sampleuser')
+BUILDBOT_TRY_PASSWORD = os.getenv('BUILDBOT_TRY_PASSWORD', 'samplepass')
 
 SUCCESS = 0
 ERR_UNEXPECTED = -1
index f522ac3..5948356 100644 (file)
@@ -79,7 +79,7 @@ def loadBuilderConfig(c, is_test_mode_enabled=False, master_prefix_path='./'):
         scheduler = dict(map(lambda key_value_pair: (str(key_value_pair[0]), key_value_pair[1]), scheduler.items()))
         if (schedulerClassName == 'Try_Userpass'):
             # FIXME: Read the credentials from local file on disk.
-            scheduler['userpass'] = [('sampleuser', 'samplepass')]
+            scheduler['userpass'] = [(os.getenv('BUILDBOT_TRY_USERNAME', 'sampleuser'), os.getenv('BUILDBOT_TRY_PASSWORD', 'samplepass'))]
         c['schedulers'].append(schedulerClass(**scheduler))
 
 
index 30e6647..94ba0ec 100644 (file)
@@ -1,3 +1,14 @@
+2019-04-02  Aakash Jain  <aakash_jain@apple.com>
+
+        [ews-build] Configure buildbot try credentials in environment variables
+        https://bugs.webkit.org/show_bug.cgi?id=196501
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-build/loadConfig.py: Read credentials from environment variables.
+        * BuildSlaveSupport/ews-app/ews/common/buildbot.py: Rename BUILDBOT_PB_USERNAME to BUILDBOT_TRY_USERNAME.
+        * BuildSlaveSupport/ews-app/ews/config.py: Ditto.
+
 2019-04-02  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         REGRESSION (r243726): Crash at unrecognized selector: -[WKWebpagePreferences webpagePreferences]