@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "gate.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); GateProfileFactory gateProfileFactory = getGateProfileFactory(deploymentConfiguration.getName()); Profile profile = gateProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints); appendReadonlyClouddriverForDeck(profile, deploymentConfiguration, endpoints); profiles.add(profile); return profiles; }
private GateProfileFactory getGateProfileFactory(String deploymentName) { String version = getArtifactService().getArtifactVersion(deploymentName, SpinnakerArtifact.GATE); try { if (Versions.lessThan(version, BOOT_UPGRADED_VERSION)) { return boot128ProfileFactory; } } catch (IllegalArgumentException iae) { log.warn("Could not resolve Gate version, using `boot154ProfileFactory`."); } return boot154ProfileFactory; }
private GateProfileFactory getGateProfileFactory(String deploymentName) { String version = getArtifactService().getArtifactVersion(deploymentName, SpinnakerArtifact.GATE); try { if (Versions.lessThan(version, BOOT_UPGRADED_VERSION)) { return boot128ProfileFactory; } } catch (NumberFormatException nfe) { log.warn("Could not resolve Gate version, using `boot154ProfileFactory`."); } return boot154ProfileFactory; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints); String filename = "gate.yml"; String path = Paths.get(getConfigOutputPath(), filename).toString(); GateProfileFactory gateProfileFactory = getGateProfileFactory(deploymentConfiguration.getName()); Profile profile = gateProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints); appendReadonlyClouddriverForDeck(profile, deploymentConfiguration, endpoints); profiles.add(profile); return profiles; }