Add the first part of the build worker that runs on quay.

This commit is contained in:
yackob03 2013-10-24 16:37:03 -04:00
parent 9dc9e0c940
commit 847e91b696
10 changed files with 196 additions and 11 deletions

View file

@ -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)