use of com.netflix.spinnaker.halyard.config.model.v1.artifacts.github.GitHubArtifactProvider 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());
}
}
Aggregations