Make sure start_build
cannot be called for app repos
This commit is contained in:
parent
45f14f220d
commit
54efed62ee
1 changed files with 3 additions and 0 deletions
|
@ -29,6 +29,9 @@ class MaximumBuildsQueuedException(Exception):
|
|||
|
||||
|
||||
def start_build(repository, prepared_build, pull_robot_name=None):
|
||||
if repository.kind.name != 'image':
|
||||
raise Exception('Attempt to start a build for application repository %s' % repository.id)
|
||||
|
||||
if MAX_BUILD_QUEUE_RATE_ITEMS > 0 and MAX_BUILD_QUEUE_RATE_SECS > 0:
|
||||
queue_item_canonical_name = [repository.namespace_user.username, repository.name]
|
||||
now = datetime.utcnow()
|
||||
|
|
Reference in a new issue