public Retry<E> retryOnException(Predicate<Exception> retryOnException) {
    this.retryOnException = retryOnException;
    return this;
  }
Provide a predicate to determine if a thrown exception can be retried.

@param retryOnException determine if provided exception is retryable.
@return the instance for further configuration
jib-core/src/main/java/com/google/cloud/tools/jib/cache/Retry.java