@Override
  public boolean equals(Object other) {
    if (this == other) {
      return true;
    }
    if (!(other instanceof BuildResult)) {
      return false;
    }
    BuildResult otherBuildResult = (BuildResult) other;
    return imageDigest.equals(otherBuildResult.imageDigest)
        && imageId.equals(otherBuildResult.imageId)
        && imagePushed.equals(otherBuildResult.imagePushed);
  }
Gets a {@link BuildResult} from an {@link Image}.

@param image the image
@param targetFormat the target format of the image
@return a new {@link BuildResult} with the image's digest and id
@throws IOException if writing the digest or container configuration fails
jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/BuildResult.java