public RemoteAction connectCommand(String deploymentName, List<String> serviceNames) { DeploymentConfiguration deploymentConfiguration = deploymentService.getDeploymentConfiguration(deploymentName); SpinnakerServiceProvider<DeploymentDetails> serviceProvider = serviceProviderFactory.create(deploymentConfiguration); SpinnakerRuntimeSettings runtimeSettings = serviceProvider.buildRuntimeSettings(deploymentConfiguration); Deployer deployer = getDeployer(deploymentConfiguration); DeploymentDetails deploymentDetails = getDeploymentDetails(deploymentConfiguration); List<SpinnakerService.Type> serviceTypes = serviceNames.stream() .map(SpinnakerService.Type::fromCanonicalName) .collect(Collectors.toList()); if (serviceTypes.isEmpty()) { serviceTypes.add(SpinnakerService.Type.DECK); serviceTypes.add(SpinnakerService.Type.GATE); } RemoteAction result = deployer.connectCommand(serviceProvider, deploymentDetails, runtimeSettings, serviceTypes); result.setAutoRun(true); result.commitScript(halconfigDirectoryStructure.getConnectScriptPath(deploymentName)); return result; }
public RemoteAction connectCommand(String deploymentName, List<String> serviceNames) { DeploymentConfiguration deploymentConfiguration = deploymentService.getDeploymentConfiguration(deploymentName); SpinnakerServiceProvider<DeploymentDetails> serviceProvider = serviceProviderFactory.create(deploymentConfiguration); SpinnakerRuntimeSettings runtimeSettings = serviceProvider.buildRuntimeSettings(deploymentConfiguration); Deployer deployer = getDeployer(deploymentConfiguration); DeploymentDetails deploymentDetails = getDeploymentDetails(deploymentConfiguration); List<SpinnakerService.Type> serviceTypes = serviceNames.stream() .map(SpinnakerService.Type::fromCanonicalName) .collect(Collectors.toList()); if (serviceTypes.isEmpty()) { serviceTypes.add(SpinnakerService.Type.DECK); serviceTypes.add(SpinnakerService.Type.GATE); } RemoteAction result = deployer.connectCommand(serviceProvider, deploymentDetails, runtimeSettings, serviceTypes); result.setAutoRun(true); result.commitScript(halconfigDirectoryStructure.getConnectScriptPath(deploymentName)); return result; }