Add multiple executor and whitelist support to build manager
This commit is contained in:
parent
6bdbe25cdc
commit
811413fe9c
4 changed files with 239 additions and 181 deletions
|
@ -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:
|
||||
|
|
Reference in a new issue