Add the first part of the build worker that runs on quay.
This commit is contained in:
parent
9dc9e0c940
commit
847e91b696
10 changed files with 196 additions and 11 deletions
|
@ -30,6 +30,10 @@ class InvalidTokenException(DataModelException):
|
|||
pass
|
||||
|
||||
|
||||
class InvalidRepositoryBuildException(DataModelException):
|
||||
pass
|
||||
|
||||
|
||||
def create_user(username, password, email):
|
||||
if not validate_email(email):
|
||||
raise InvalidEmailAddressException('Invalid email address: %s' % email)
|
||||
|
@ -548,3 +552,11 @@ def load_token_data(code):
|
|||
return fetched[0]
|
||||
else:
|
||||
raise InvalidTokenException('Invalid delegate token code: %s' % code)
|
||||
|
||||
|
||||
def get_repository_build(request_dbid):
|
||||
try:
|
||||
return RepositoryBuild.get(RepositoryBuild == request_dbid)
|
||||
except RepositoryBuild.DoesNotExist:
|
||||
msg = 'Unable to locate a build by id: %s' % request_dbid
|
||||
raise InvalidRepositoryBuildException(msg)
|
||||
|
|
Reference in a new issue