private Containerizer configureContainer(final Containerizer to, final ExecutorService executor) { return to .setExecutorService(executor) .setApplicationLayersCache(layersCacheDirectory.toPath()) .setBaseImageLayersCache(layersCacheDirectory.toPath()) .setToolName("Talend Image Maven Plugin") .setEventHandlers(new EventHandlers()); }
/** * Configures a {@link Containerizer} with values pulled from project properties/raw build * configuration. * * @param containerizer the {@link Containerizer} to configure * @param rawConfiguration the raw build configuration * @param projectProperties the project properties */ private static void configureContainerizer( Containerizer containerizer, RawConfiguration rawConfiguration, ProjectProperties projectProperties) { containerizer .setToolName(projectProperties.getToolName()) .setEventHandlers(projectProperties.getEventHandlers()) .setAllowInsecureRegistries(rawConfiguration.getAllowInsecureRegistries()) .setBaseImageLayersCache( getCheckedCacheDirectory( PropertyNames.BASE_IMAGE_CACHE, Boolean.getBoolean(PropertyNames.USE_ONLY_PROJECT_CACHE) ? projectProperties.getDefaultCacheDirectory() : Containerizer.DEFAULT_BASE_CACHE_DIRECTORY)) .setApplicationLayersCache( getCheckedCacheDirectory( PropertyNames.APPLICATION_CACHE, projectProperties.getDefaultCacheDirectory())); rawConfiguration.getToTags().forEach(containerizer::withAdditionalTag); }
/** * Configures a {@link Containerizer} with values pulled from project properties/raw build * configuration. * * @param containerizer the {@link Containerizer} to configure * @param rawConfiguration the raw build configuration * @param projectProperties the project properties */ private static void configureContainerizer( Containerizer containerizer, RawConfiguration rawConfiguration, ProjectProperties projectProperties) { containerizer .setToolName(projectProperties.getToolName()) .setEventHandlers(projectProperties.getEventHandlers()) .setAllowInsecureRegistries(rawConfiguration.getAllowInsecureRegistries()) .setBaseImageLayersCache( getCheckedCacheDirectory( PropertyNames.BASE_IMAGE_CACHE, Boolean.getBoolean(PropertyNames.USE_ONLY_PROJECT_CACHE) ? projectProperties.getDefaultCacheDirectory() : Containerizer.DEFAULT_BASE_CACHE_DIRECTORY)) .setApplicationLayersCache( getCheckedCacheDirectory( PropertyNames.APPLICATION_CACHE, projectProperties.getDefaultCacheDirectory())); rawConfiguration.getToTags().forEach(containerizer::withAdditionalTag); }