@Bean public TaskPlatform cloudFoundryPlatform( CloudFoundryPlatformProperties cloudFoundryPlatformProperties) { List<Launcher> launchers = cloudFoundryPlatformProperties.getAccounts().entrySet().stream().map( e -> createAndSaveCFTaskLauncher(e.getKey(), e.getValue())).collect(Collectors.toList()); return new TaskPlatform("Cloud Foundry", launchers); }
@Bean public TaskPlatform kubernetesTaskPlatform(KubernetesPlatformProperties kubernetesPlatformProperties) { List<Launcher> launchers = new ArrayList<>(); Map<String, KubernetesDeployerProperties> k8sDeployerPropertiesMap = kubernetesPlatformProperties .getAccounts(); k8sDeployerPropertiesMap.forEach((key, value) -> { Launcher launcher = createAndSaveKubernetesTaskLaunchers(key, value); launchers.add(launcher); }); return new TaskPlatform("Kubernetes", launchers); }
@Bean public TaskPlatform cloudFoundryPlatform( CloudFoundryPlatformProperties cloudFoundryPlatformProperties) { List<Launcher> launchers = cloudFoundryPlatformProperties.getAccounts().entrySet().stream().map( e -> createAndSaveCFTaskLauncher(e.getKey(), e.getValue())).collect(Collectors.toList()); return new TaskPlatform("Cloud Foundry", launchers); }
@Bean @Conditional(OnLocalPlatform.class) public TaskPlatform localTaskPlatform(LocalPlatformProperties localPlatformProperties) { List<Launcher> launchers = new ArrayList<>(); Map<String, LocalDeployerProperties> localDeployerPropertiesMap = localPlatformProperties.getAccounts(); for (Map.Entry<String, LocalDeployerProperties> entry : localDeployerPropertiesMap .entrySet()) { LocalTaskLauncher localTaskLauncher = new LocalTaskLauncher(entry.getValue()); Launcher launcher = new Launcher(entry.getKey(), "local", localTaskLauncher); launcher.setDescription(prettyPrintLocalDeployerProperties(entry.getValue())); launchers.add(launcher); } return new TaskPlatform("Local", launchers); }