Ejemplo n.º 1
0
    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_file.get('fromversion', '0'), '5.0.0') < 0:
            old_docker = get_dockerimage45(self.old_file.get('script', {}))
            new_docker = get_dockerimage45(self.current_file.get('script', {}))
            if old_docker != new_docker:
                print_error(Errors.breaking_backwards_docker(self.file_path, old_docker, new_docker))
                self.is_valid = False
                return True

        return False
Ejemplo n.º 2
0
 def is_docker_image_changed(self):
     # type: () -> bool
     """Check if the docker image as been changed."""
     # Unnecessary to check docker image only on 5.0 and up
     if server_version_compare(self.old_file.get('fromversion', '0'),
                               '5.0.0') < 0:
         old_docker = get_dockerimage45(self.old_file)
         new_docker = get_dockerimage45(self.current_file)
         if old_docker != new_docker:
             print_error(
                 Errors.breaking_backwards_docker(self.file_path,
                                                  old_docker, new_docker))
             return True
     return False