Title: [243854] trunk/Tools
- Revision
- 243854
- Author
- aakash_j...@apple.com
- Date
- 2019-04-03 20:57:11 -0700 (Wed, 03 Apr 2019)
Log Message
[ews-build] Cancel build and similar operations should have authentication
https://bugs.webkit.org/show_bug.cgi?id=196520
Reviewed by Dewei Zhu.
* BuildSlaveSupport/ews-build/master.cfg: Configure authentication using admin's username and password from
environment variables.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/ews-build/master.cfg (243853 => 243854)
--- trunk/Tools/BuildSlaveSupport/ews-build/master.cfg 2019-04-04 03:44:18 UTC (rev 243853)
+++ trunk/Tools/BuildSlaveSupport/ews-build/master.cfg 2019-04-04 03:57:11 UTC (rev 243854)
@@ -1,6 +1,9 @@
import os
import socket
+import sys
+from buildbot.plugins import util
+
import loadConfig
from events import Events
@@ -16,6 +19,21 @@
'Workers.showWorkerBuilders': True,
}
+if not is_test_mode_enabled:
+ admin_username = os.getenv('EWS_ADMIN_USERNAME')
+ admin_password = os.getenv('EWS_ADMIN_PASSWORD')
+ if not admin_username or not admin_password:
+ print('Environment variables for admin username/password not found. Please ensure these variables are set.')
+ sys.exit(1)
+ # See https://docs.buildbot.net/current/manual/configuration/www.html#example-configs
+ authz = util.Authz(
+ allowRules=[util.AnyControlEndpointMatcher(role="admin")],
+ roleMatchers=[util.RolesFromEmails(admin=[admin_username])]
+ )
+ auth = util.UserPasswordAuth({admin_username: admin_password})
+ c['www']['auth'] = auth
+ c['www']['authz'] = authz
+
c['protocols'] = {'pb': {'port': 17000}}
c['projectName'] = 'WebKit EWS'
Modified: trunk/Tools/ChangeLog (243853 => 243854)
--- trunk/Tools/ChangeLog 2019-04-04 03:44:18 UTC (rev 243853)
+++ trunk/Tools/ChangeLog 2019-04-04 03:57:11 UTC (rev 243854)
@@ -1,5 +1,15 @@
2019-04-03 Aakash Jain <aakash_j...@apple.com>
+ [ews-build] Cancel build and similar operations should have authentication
+ https://bugs.webkit.org/show_bug.cgi?id=196520
+
+ Reviewed by Dewei Zhu.
+
+ * BuildSlaveSupport/ews-build/master.cfg: Configure authentication using admin's username and password from
+ environment variables.
+
+2019-04-03 Aakash Jain <aakash_j...@apple.com>
+
[ews-build] Do not trigger queues which are not in production yet
https://bugs.webkit.org/show_bug.cgi?id=196581
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes