use of com.thoughtworks.go.config.remote.PartialConfig in project gocd by gocd.
the class XmlPartialConfigProvider method load.
@Override
public PartialConfig load(File configRepoCheckoutDirectory, PartialConfigLoadContext context) {
File[] allFiles = getFiles(configRepoCheckoutDirectory, context);
// if context had changed files list then we could parse only new content
PartialConfig[] allFragments = parseFiles(allFiles);
PartialConfig partialConfig = new PartialConfig();
collectFragments(allFragments, partialConfig);
partialConfig.validatePart();
return partialConfig;
}
use of com.thoughtworks.go.config.remote.PartialConfig in project gocd by gocd.
the class PartialConfigMother method withParams.
public static PartialConfig withParams(String name, String paramName, String paramValue, RepoConfigOrigin repoConfigOrigin) {
StageConfig stageConfig = StageConfigMother.stageConfigWithParams("stage", paramName);
PipelineConfig pipeline = PipelineConfigMother.pipelineConfig(name, stageConfig);
pipeline.setParams(new ParamsConfig(new ParamConfig(paramName, paramValue)));
BasicPipelineConfigs pipelineConfigs = new BasicPipelineConfigs(pipeline);
pipelineConfigs.setGroup("group");
PartialConfig partialConfig = new PartialConfig(new PipelineGroups(pipelineConfigs));
partialConfig.setOrigins(repoConfigOrigin);
return partialConfig;
}
use of com.thoughtworks.go.config.remote.PartialConfig in project gocd by gocd.
the class PartialConfigMother method withEnvironment.
public static PartialConfig withEnvironment(String name, RepoConfigOrigin repoConfigOrigin) {
BasicEnvironmentConfig env = EnvironmentConfigMother.environment(name);
PartialConfig partialConfig = new PartialConfig();
partialConfig.getEnvironments().add(env);
partialConfig.setOrigins(repoConfigOrigin);
return partialConfig;
}
use of com.thoughtworks.go.config.remote.PartialConfig in project gocd by gocd.
the class PartialConfigMother method withPipelineInGroup.
public static PartialConfig withPipelineInGroup(String pipelineName, String groupName) {
PipelineConfig pipe = PipelineConfigMother.pipelineConfig(pipelineName);
BasicPipelineConfigs pipes = new BasicPipelineConfigs(groupName, new Authorization(), pipe);
PartialConfig partialConfig = new PartialConfig(new PipelineGroups(pipes));
partialConfig.setOrigins(createRepoOrigin());
return partialConfig;
}
use of com.thoughtworks.go.config.remote.PartialConfig in project gocd by gocd.
the class PartialConfigMother method withPipelineAssociatedWithTemplate.
public static PartialConfig withPipelineAssociatedWithTemplate(String name, String templateName, RepoConfigOrigin repoConfigOrigin) {
PipelineConfig pipeline = PipelineConfigMother.pipelineConfigWithTemplate(name, templateName);
BasicPipelineConfigs pipelineConfigs = new BasicPipelineConfigs(pipeline);
pipelineConfigs.setGroup("group");
PartialConfig partialConfig = new PartialConfig(new PipelineGroups(pipelineConfigs));
partialConfig.setOrigins(repoConfigOrigin);
return partialConfig;
}
Aggregations