Search in sources :

Example 71 with FileConfigOrigin

use of com.thoughtworks.go.config.remote.FileConfigOrigin in project gocd by gocd.

the class GoConfigMother method addPipeline.

public PipelineConfig addPipeline(CruiseConfig cruiseConfig, String pipelineName, String stageName, MaterialConfigs materialConfigs, String... buildNames) {
    StageConfig stageConfig = StageConfigMother.custom(stageName, defaultBuildPlans(buildNames));
    PipelineConfig pipelineConfig = new PipelineConfig(new CaseInsensitiveString(pipelineName), materialConfigs, stageConfig);
    pipelineConfig.setOrigin(new FileConfigOrigin());
    cruiseConfig.addPipeline(DEFAULT_GROUP, pipelineConfig);
    return pipelineConfig;
}
Also used : FileConfigOrigin(com.thoughtworks.go.config.remote.FileConfigOrigin)

Example 72 with FileConfigOrigin

use of com.thoughtworks.go.config.remote.FileConfigOrigin in project gocd by gocd.

the class FullConfigSaveFlow method postValidationUpdates.

protected void postValidationUpdates(CruiseConfig configForEdit, String xmlString) throws NoSuchFieldException, IllegalAccessException {
    String md5 = CachedDigestUtils.md5Hex(xmlString);
    configForEdit.setOrigins(new FileConfigOrigin());
    MagicalGoConfigXmlLoader.setMd5(configForEdit, md5);
}
Also used : FileConfigOrigin(com.thoughtworks.go.config.remote.FileConfigOrigin)

Aggregations

FileConfigOrigin (com.thoughtworks.go.config.remote.FileConfigOrigin)72 Test (org.junit.jupiter.api.Test)48 RepoConfigOrigin (com.thoughtworks.go.config.remote.RepoConfigOrigin)25 Test (org.junit.Test)10 PipelineConfig (com.thoughtworks.go.config.PipelineConfig)6 MergeEnvironmentConfig (com.thoughtworks.go.config.merge.MergeEnvironmentConfig)4 BasicPipelineConfigs (com.thoughtworks.go.config.BasicPipelineConfigs)3 PipelineConfigs (com.thoughtworks.go.config.PipelineConfigs)3 DependencyMaterialConfig (com.thoughtworks.go.config.materials.dependency.DependencyMaterialConfig)3 ConfigOrigin (com.thoughtworks.go.config.remote.ConfigOrigin)3 ConfigRepoConfig (com.thoughtworks.go.config.remote.ConfigRepoConfig)3 HttpLocalizedOperationResult (com.thoughtworks.go.server.service.result.HttpLocalizedOperationResult)3 MergePipelineConfigs (com.thoughtworks.go.config.merge.MergePipelineConfigs)2 UIConfigOrigin (com.thoughtworks.go.config.remote.UIConfigOrigin)2 GoCipher (com.thoughtworks.go.security.GoCipher)2 BasicEnvironmentConfig (com.thoughtworks.go.config.BasicEnvironmentConfig)1 CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)1 RecordNotFoundException (com.thoughtworks.go.config.exceptions.RecordNotFoundException)1 MaterialConfigs (com.thoughtworks.go.config.materials.MaterialConfigs)1 GitMaterialConfig (com.thoughtworks.go.config.materials.git.GitMaterialConfig)1