Search in sources :

Example 1 with HttpArtifactProvider

use of com.netflix.spinnaker.halyard.config.model.v1.artifacts.http.HttpArtifactProvider in project halyard by spinnaker.

the class ArtifactProviderService method setArtifactProvider.

public void setArtifactProvider(String deploymentName, ArtifactProvider provider) {
    DeploymentConfiguration deploymentConfiguration = deploymentService.getDeploymentConfiguration(deploymentName);
    Artifacts artifacts = deploymentConfiguration.getArtifacts();
    switch(provider.providerType()) {
        case GCS:
            artifacts.setGcs((GcsArtifactProvider) provider);
            break;
        case GITHUB:
            artifacts.setGithub((GitHubArtifactProvider) provider);
            break;
        case HTTP:
            artifacts.setHttp((HttpArtifactProvider) provider);
            break;
        default:
            throw new IllegalArgumentException("Unknown provider type " + provider.providerType());
    }
}
Also used : Artifacts(com.netflix.spinnaker.halyard.config.model.v1.node.Artifacts) DeploymentConfiguration(com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration)

Aggregations

Artifacts (com.netflix.spinnaker.halyard.config.model.v1.node.Artifacts)1 DeploymentConfiguration (com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration)1