public void setPubsub(String deploymentName, Pubsub pubsub) { DeploymentConfiguration deploymentConfiguration = deploymentService.getDeploymentConfiguration(deploymentName); Pubsubs pubsubs = deploymentConfiguration.getPubsub(); switch (pubsub.getPubsubType()) { case GOOGLE: pubsubs.setGoogle((GooglePubsub) pubsub); break; default: throw new IllegalArgumentException("Unknown pubsub type " + pubsub.getPubsubType()); } }
public void setPubsub(String deploymentName, Pubsub pubsub) { DeploymentConfiguration deploymentConfiguration = deploymentService.getDeploymentConfiguration(deploymentName); Pubsubs pubsubs = deploymentConfiguration.getPubsub(); switch (pubsub.pubsubType()) { case GOOGLE: pubsubs.setGoogle((GooglePubsub) pubsub); break; default: throw new IllegalArgumentException("Unknown pubsub type " + pubsub.pubsubType()); } }
@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); }