Search in sources :

Example 1 with CustomProfileFactory

use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.CustomProfileFactory in project halyard by spinnaker.

the class SpinnakerService method customProfile.

public Optional<Profile> customProfile(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings runtimeSettings, Path profilePath, String profileName) {
    return customProfileOutputPath(profileName).flatMap(outputPath -> {
        SpinnakerArtifact artifact = getArtifact();
        ProfileFactory factory = new CustomProfileFactory() {

            @Override
            public SpinnakerArtifact getArtifact() {
                return artifact;
            }

            protected ArtifactService getArtifactService() {
                return artifactService;
            }

            @Override
            protected Path getUserProfilePath() {
                return profilePath;
            }
        };
        return Optional.of(factory.getProfile(profileName, outputPath, deploymentConfiguration, runtimeSettings));
    });
}
Also used : SpinnakerArtifact(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerArtifact) CustomProfileFactory(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.CustomProfileFactory) ProfileFactory(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.ProfileFactory) CustomProfileFactory(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.CustomProfileFactory)

Aggregations

SpinnakerArtifact (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerArtifact)1 CustomProfileFactory (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.CustomProfileFactory)1 ProfileFactory (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.ProfileFactory)1