use of com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration in project halyard by spinnaker.
the class DeploymentEnvironmentService method setDeploymentEnvironment.
public void setDeploymentEnvironment(String deploymentName, DeploymentEnvironment newDeploymentEnvironment) {
DeploymentConfiguration deploymentConfiguration = deploymentService.getDeploymentConfiguration(deploymentName);
deploymentConfiguration.setDeploymentEnvironment(newDeploymentEnvironment);
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration in project halyard by spinnaker.
the class DCOSAccount method dockerRegistriesOptions.
protected List<String> dockerRegistriesOptions(ConfigProblemSetBuilder psBuilder) {
DeploymentConfiguration context = parentOfType(DeploymentConfiguration.class);
DockerRegistryProvider dockerRegistryProvider = context.getProviders().getDockerRegistry();
if (dockerRegistryProvider != null) {
return dockerRegistryProvider.getAccounts().stream().map(Account::getName).collect(Collectors.toList());
} else {
return null;
}
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration in project halyard by spinnaker.
the class ArtifactService method getBillOfMaterials.
BillOfMaterials getBillOfMaterials(String deploymentName) {
DeploymentConfiguration deploymentConfiguration = deploymentService.getDeploymentConfiguration(deploymentName);
String version = deploymentConfiguration.getVersion();
return versionsService.getBillOfMaterials(version);
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration in project halyard by spinnaker.
the class ClouddriverProfileFactory method setProfile.
@Override
protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
super.setProfile(profile, deploymentConfiguration, endpoints);
// We need to make modifications to this deployment configuration, but can't use helpful objects
// like the accountService on a clone. Therefore, we'll make the modifications in place and
// restore to the original state when the modifications are written out.
Providers originalProviders = deploymentConfiguration.getProviders().cloneNode(Providers.class);
Providers modifiedProviders = deploymentConfiguration.getProviders();
DeploymentEnvironment deploymentEnvironment = deploymentConfiguration.getDeploymentEnvironment();
if (deploymentEnvironment.getBootstrapOnly() != null && deploymentEnvironment.getBootstrapOnly()) {
String bootstrapAccountName = deploymentEnvironment.getAccountName();
removeBootstrapOnlyAccount(modifiedProviders, deploymentConfiguration.getName(), bootstrapAccountName);
}
Artifacts artifacts = deploymentConfiguration.getArtifacts();
List<String> files = backupRequiredFiles(modifiedProviders, deploymentConfiguration.getName());
files.addAll(backupRequiredFiles(artifacts, deploymentConfiguration.getName()));
if (deploymentConfiguration.getProviders() != null) {
processProviders(deploymentConfiguration.getProviders());
}
profile.appendContents(yamlToString(modifiedProviders)).appendContents(yamlToString(new ArtifactWrapper(artifacts))).appendContents(profile.getBaseContents()).setRequiredFiles(files);
deploymentConfiguration.setProviders(originalProviders);
}
use of com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration in project halyard by spinnaker.
the class EchoProfileFactory method setProfile.
@Override
protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
super.setProfile(profile, deploymentConfiguration, endpoints);
List<String> files = new ArrayList<>();
profile.appendContents("global.spinnaker.timezone: " + deploymentConfiguration.getTimezone());
profile.appendContents("spinnaker.baseUrl: " + endpoints.getServices().getDeck().getBaseUrl());
Notifications notifications = deploymentConfiguration.getNotifications();
if (notifications != null) {
files.addAll(backupRequiredFiles(notifications, deploymentConfiguration.getName()));
profile.appendContents(yamlToString(notifications));
}
Pubsubs pubsubs = deploymentConfiguration.getPubsub();
if (pubsubs != null) {
files.addAll(backupRequiredFiles(pubsubs, deploymentConfiguration.getName()));
profile.appendContents(yamlToString(new PubsubWrapper(pubsubs)));
}
profile.appendContents(profile.getBaseContents()).setRequiredFiles(files);
}
Aggregations