@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.getServiceSettings(Type.DECK).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); }
@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.getServiceSettings(Type.DECK).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))); } Artifacts artifacts = deploymentConfiguration.getArtifacts(); if (artifacts != null) { files.addAll(backupRequiredFiles(artifacts, deploymentConfiguration.getName())); profile.appendContents(yamlToString(new ArtifactWrapper(artifacts))); } profile.appendContents(profile.getBaseContents()) .setRequiredFiles(files); }