Add multiple executor and whitelist support to build manager

This commit is contained in:
Joseph Schorr 2016-07-08 14:52:14 -04:00
parent 6bdbe25cdc
commit 811413fe9c
4 changed files with 239 additions and 181 deletions

View file

@ -61,6 +61,20 @@ class BuilderExecutor(object):
"""
raise NotImplementedError
def allowed_for_namespace(self, namespace):
""" Returns true if this executor can be used for builds in the given namespace. """
namespace_whitelist = self.executor_config.get('NAMESPACE_WHITELIST')
if namespace_whitelist is not None:
return namespace in namespace_whitelist
return True
@property
def minimum_retry_threshold(self):
""" Returns the minimum number of retries required for this executor to be used or 0 if
none. """
return self.executor_config.get('MINIMUM_RETRY_THRESHOLD', 0)
def generate_cloud_config(self, realm, token, coreos_channel, manager_hostname,
quay_username=None, quay_password=None):
if quay_username is None: