Example #1
0
    def get(self, build_uuid):
        """ Return the status for the builds specified by the build uuids. """
        if SuperUserPermission().can():
            try:
                build = pre_oci_model.get_repository_build(build_uuid)
            except InvalidRepositoryBuildException as e:
                raise InvalidResponse(str(e))
            return build.to_dict()

        raise Unauthorized()
Example #2
0
    def get(self, build_uuid):
        """ Return the build logs for the build specified by the build uuid. """
        if SuperUserPermission().can():
            try:
                repo_build = pre_oci_model.get_repository_build(build_uuid)
                return get_logs_or_log_url(repo_build)
            except InvalidRepositoryBuildException as e:
                raise InvalidResponse(str(e))

        raise Unauthorized()