pyfunceble_docker/base.py
def is_already_pushed(self, tag: str):
        """
        Checks if the given tag was already pushed.
        """

        url = f"https://registry.hub.docker.com/v2/repositories/{self.docker_repository}/tags/"

        tag_published = False

        while True:
            req = requests.get(url)
            req.raise_for_status()

            data = req.json()

            tag_published = any([x["name"] == tag for x in data["results"]])

            if not tag_published and "next" in data and data["next"]:
                url = data["next"]
            else:
                break

        logging.debug("Tag published: %s", tag_published)

        return tag_published

        Checks if the given tag was already pushed.
        
Checks if the given tag was already pushed.
Checks if the given tag was already pushed .
def is_already_pushed(self, tag: str):
        url = f"https://registry.hub.docker.com/v2/repositories/{self.docker_repository}/tags/"
        tag_published = False
        while True:
            req = requests.get(url)
            req.raise_for_status()
            data = req.json()
            tag_published = any([x["name"] == tag for x in data["results"]])
            if not tag_published and "next" in data and data["next"]:
                url = data["next"]
            else:
                break
        logging.debug("Tag published: %s", tag_published)
        return tag_published
def is_already_pushed ( self , tag : str ) : url = f"https://registry.hub.docker.com/v2/repositories/{self.docker_repository}/tags/" tag_published = False while True : req = requests . get ( url ) req . raise_for_status ( ) data = req . json ( ) tag_published = any ( [ x [ "name" ] == tag for x in data [ "results" ] ] ) if not tag_published and "next" in data and data [ "next" ] : url = data [ "next" ] else : break logging . debug ( "Tag published: %s" , tag_published ) return tag_published
Checks if the given tag was already pushed.
Checks if the given tag was already pushed .
"""
        Checks if the given tag was already pushed.
        """
self
tag
str