Update the buildman with the database job config post merge with nomenclature.

This commit is contained in:
Jake Moshenko 2014-12-08 14:43:32 -05:00
parent ed28bdb28b
commit fd825b82cd

View file

@ -19,9 +19,7 @@ class BuildJob(object):
)
try:
self._repo_build = model.get_repository_build(self._job_details['namespace'],
self._job_details['repository'],
self._job_details['build_uuid'])
self._repo_build = model.get_repository_build(self._job_details['build_uuid'])
except model.InvalidRepositoryBuildException:
raise BuildJobLoadException(
'Could not load repository build with ID %s' % self._job_details['build_uuid'])
@ -38,8 +36,8 @@ class BuildJob(object):
# TODO(jschorr): Change this to use the more complicated caching rules, once we have caching
# be a pull of things besides the constructed tags.
tags = self._build_config.get('docker_tags', ['latest'])
existing_tags = model.list_repository_tags(self._job_details['namespace'],
self._job_details['repository'])
existing_tags = model.list_repository_tags(self._repo_build.repository.namespace_user.username,
self._repo_build.repository.name)
cached_tags = set(tags) & set([tag.name for tag in existing_tags])
if cached_tags: