diff --git a/buildman/jobutil/buildjob.py b/buildman/jobutil/buildjob.py index 2b9dbf35c..6ec02a830 100644 --- a/buildman/jobutil/buildjob.py +++ b/buildman/jobutil/buildjob.py @@ -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: