use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.local.git.LocalGitServiceProvider in project halyard by spinnaker.
the class LocalGitDeployer method prep.
@Override
public RemoteAction prep(LocalServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) {
LocalGitServiceProvider localGitServiceProvider = (LocalGitServiceProvider) serviceProvider;
List<LocalGitService> enabledServices = localGitServiceProvider.getLocalGitServices(serviceTypes);
List<String> prepCommands = enabledServices.stream().filter(i -> !runtimeSettings.getServiceSettings(i.getService()).getSkipLifeCycleManagement()).map(s -> {
s.commitWrapperScripts();
return s.prepArtifactCommand(deploymentDetails);
}).collect(Collectors.toList());
String prepCommand = localGitServiceProvider.getPrepCommand(deploymentDetails, prepCommands);
RemoteAction result = new RemoteAction();
result.setAutoRun(true);
result.setScript(prepCommand);
return result;
}
Aggregations