Tests/scripts/hook_validations/docker.py
def parse_docker_image(docker_image):
        """Verify that the docker image is of demisto format & parse the name and tag

        Args:
            docker_image: String representation of the docker image name and tag

        Returns:
            The name and the tag of the docker image
        """
        if docker_image:
            tag = ''
            image = ''
            try:
                image_regex = re.findall(r'(demisto\/.+)', docker_image, re.IGNORECASE)
                if image_regex:
                    image = image_regex[0]
                if ':' in image:
                    image_split = image.split(':')
                    image = image_split[0]
                    tag = image_split[1]
                else:
                    print_error('The docker image in your integration/script does not have a tag, please attach the '
                                'latest tag')
            except IndexError:
                print_error('The docker image: {} is not of format - demisto/image_name'
                            .format(docker_image))

            return image, tag
        else:
            # If the yml file has no docker image we provide the default one 'demisto/python:1.3-alpine'
            return 'demisto/python', '1.3-alpine'
Verify that the docker image is of demisto format & parse the name and tag

        Args:
            docker_image: String representation of the docker image name and tag

        Returns:
            The name and the tag of the docker image
        
Verify that the docker image is of demisto format & parse the name and tag
Verify that the docker image is of demisto format & parse the name and tag
def parse_docker_image(docker_image):
        if docker_image:
            tag = ''
            image = ''
            try:
                image_regex = re.findall(r'(demisto\/.+)', docker_image, re.IGNORECASE)
                if image_regex:
                    image = image_regex[0]
                if ':' in image:
                    image_split = image.split(':')
                    image = image_split[0]
                    tag = image_split[1]
                else:
                    print_error('The docker image in your integration/script does not have a tag, please attach the '
                                'latest tag')
            except IndexError:
                print_error('The docker image: {} is not of format - demisto/image_name'
                            .format(docker_image))
            return image, tag
        else:
            return 'demisto/python', '1.3-alpine'
def parse_docker_image ( docker_image ) : if docker_image : tag = '' image = '' try : image_regex = re . findall ( r'(demisto\/.+)' , docker_image , re . IGNORECASE ) if image_regex : image = image_regex [ 0 ] if ':' in image : image_split = image . split ( ':' ) image = image_split [ 0 ] tag = image_split [ 1 ] else : print_error ( 'The docker image in your integration/script does not have a tag, please attach the ' 'latest tag' ) except IndexError : print_error ( 'The docker image: {} is not of format - demisto/image_name' . format ( docker_image ) ) return image , tag else : return 'demisto/python' , '1.3-alpine'
Verify that the docker image is of demisto format & parse the name and tag
Verify that the docker image is of demisto format & parse the name and tag
"""Verify that the docker image is of demisto format & parse the name and tag

        Args:
            docker_image: String representation of the docker image name and tag

        Returns:
            The name and the tag of the docker image
        """ # If the yml file has no docker image we provide the default one 'demisto/python:1.3-alpine'
The name and the tag of the docker image
The name and the tag of the docker image
docker_image
String representation of the docker image name and tag
String representation of the docker image name and tag