@classmethod
def get_current(cls, app, os_image, tag):
    """
        Given an app, OS image, and a tag, look for a build that matches
        all three and was successfully built (or is currently building).
        If not found, return None.
        """
    builds = cls.objects.filter(app=app, os_image=os_image, tag=tag).exclude(
        status='expired').exclude(status='failed').order_by('-id')
    return next(iter(builds), None)
