jib icon indicating copy to clipboard operation
jib copied to clipboard

Substitute ContainerBuildPlan for ContainerConfiguration and JibContainerBuilder.layerConfigurations

Open chanseokoh opened this issue 5 years ago • 0 comments

As mentioned in JibContainerBuilder.

  private final ContainerBuildPlan.Builder containerBuildPlanBuilder = ContainerBuildPlan.builder();
  // TODO(chanseok): remove and use containerBuildPlanBuilder instead. Note that
  // ContainerConfiguation implements equals() and hashCode(), so need to verify
  // if they are required.
  private final ContainerConfiguration.Builder containerConfigurationBuilder =
      ContainerConfiguration.builder();

The two classes are basically identical. As of now, JibContainerBuilder is using both (i.e., duplicating configuration in each class): ContainerConfiguration for internal and historical use with the jib-core backend code, and ContainerBuildPlan for public API.

layerConfigurations can be removed too.

  // TODO(chanseok): remove and use containerBuildPlanBuilder instead.
  private List<FileEntriesLayer> layerConfigurations = new ArrayList<>();

chanseokoh avatar Jul 24 '20 18:07 chanseokoh