Tests/scripts/hook_validations/integration.py
def is_docker_image_changed(self):
        """Check if the Docker image was changed or not."""
        # Unnecessary to check docker image only on 5.0 and up
        if server_version_compare(self.old_integration.get('fromversion', '0'), '5.0.0') < 0:
            old_docker = get_dockerimage45(self.old_integration.get('script', {}))
            new_docker = get_dockerimage45(self.current_integration.get('script', {}))
            if old_docker != new_docker and new_docker:
                print_error("Possible backwards compatibility break, You've changed the docker for the file {}"
                            " this is not allowed. Old: {}. New: {}".format(self.file_path, old_docker, new_docker))
                self._is_valid = False
                return True
            elif old_docker != new_docker and not new_docker:
                print_warning("Possible backwards compatibility break. You've removed "
                              "the docker image for the file {0}, make sure this isn't a mistake.  "
                              "Old image: {1}".format(self.file_path, old_docker))
                return False

        return False
Check if the Docker image was changed or not.
Check if the Docker image was changed or not.
Check if the Docker image was changed or not .
def is_docker_image_changed(self):
        if server_version_compare(self.old_integration.get('fromversion', '0'), '5.0.0') < 0:
            old_docker = get_dockerimage45(self.old_integration.get('script', {}))
            new_docker = get_dockerimage45(self.current_integration.get('script', {}))
            if old_docker != new_docker and new_docker:
                print_error("Possible backwards compatibility break, You've changed the docker for the file {}"
                            " this is not allowed. Old: {}. New: {}".format(self.file_path, old_docker, new_docker))
                self._is_valid = False
                return True
            elif old_docker != new_docker and not new_docker:
                print_warning("Possible backwards compatibility break. You've removed "
                              "the docker image for the file {0}, make sure this isn't a mistake.  "
                              "Old image: {1}".format(self.file_path, old_docker))
                return False
        return False
def is_docker_image_changed ( self ) : if server_version_compare ( self . old_integration . get ( 'fromversion' , '0' ) , '5.0.0' ) < 0 : old_docker = get_dockerimage45 ( self . old_integration . get ( 'script' , { } ) ) new_docker = get_dockerimage45 ( self . current_integration . get ( 'script' , { } ) ) if old_docker != new_docker and new_docker : print_error ( "Possible backwards compatibility break, You've changed the docker for the file {}" " this is not allowed. Old: {}. New: {}" . format ( self . file_path , old_docker , new_docker ) ) self . _is_valid = False return True elif old_docker != new_docker and not new_docker : print_warning ( "Possible backwards compatibility break. You've removed " "the docker image for the file {0}, make sure this isn't a mistake.  " "Old image: {1}" . format ( self . file_path , old_docker ) ) return False return False
Check if the Docker image was changed or not.
Check if the Docker image was changed or not .
"""Check if the Docker image was changed or not.""" # Unnecessary to check docker image only on 5.0 and up
self