use of org.pf4j.update.verifier.CompoundVerifier in project kork by spinnaker.
the class Front50PluginsConfiguration method pluginFront50UpdateRepository.
@Bean
public static UpdateRepository pluginFront50UpdateRepository(Front50Service front50Service, Environment environment, Map<String, PluginRepositoryProperties> pluginRepositoriesConfig, FileDownloaderProvider fileDownloaderProvider) {
PluginRepositoryProperties front50RepositoryProps = pluginRepositoriesConfig.get(PluginsConfigurationProperties.FRONT5O_REPOSITORY);
URL front50Url = getFront50Url(environment, front50RepositoryProps);
return new Front50UpdateRepository(PluginsConfigurationProperties.FRONT5O_REPOSITORY, front50Url, fileDownloaderProvider.get(front50RepositoryProps.fileDownloader), new CompoundVerifier(), front50Service);
}
use of org.pf4j.update.verifier.CompoundVerifier in project kork by spinnaker.
the class PluginsAutoConfiguration method pluginUpdateRepositories.
@Bean
@SneakyThrows
public static List<UpdateRepository> pluginUpdateRepositories(Map<String, PluginRepositoryProperties> pluginRepositoriesConfig, FileDownloaderProvider fileDownloaderProvider, PluginsConfigurationProperties properties) {
List<UpdateRepository> repositories = pluginRepositoriesConfig.entrySet().stream().filter(entry -> entry.getValue().isEnabled()).filter(entry -> !entry.getKey().equals(PluginsConfigurationProperties.FRONT5O_REPOSITORY)).map(entry -> new ConfigurableUpdateRepository(entry.getKey(), entry.getValue().getUrl(), fileDownloaderProvider.get(entry.getValue().fileDownloader), new CompoundVerifier())).collect(Collectors.toList());
if (properties.isEnableDefaultRepositories()) {
log.info("Enabling spinnaker-official and spinnaker-community plugin repositories");
repositories.add(new ConfigurableUpdateRepository(PluginsConfigurationProperties.SPINNAKER_OFFICIAL_REPOSITORY, new URL("https://raw.githubusercontent.com/spinnaker/plugins/master/official/plugins.json"), fileDownloaderProvider.get(null), new CompoundVerifier()));
repositories.add(new ConfigurableUpdateRepository(PluginsConfigurationProperties.SPINNAKER_COMMUNITY_REPOSITORY, new URL("https://raw.githubusercontent.com/spinnaker/plugins/master/community/plugins.json"), fileDownloaderProvider.get(null), new CompoundVerifier()));
}
if (repositories.isEmpty()) {
log.warn("No remote repositories defined, will fallback to looking for a " + "'repositories.json' file next to the application executable");
}
return repositories;
}
Aggregations