It's possible to load multiple config files. CasC can load YAML files from a directory. And it's convenient to maintain if we split different parts of Jenkins into multiple files.
- ErrorOnConflictMergeStrategy (default)
- The strategy name is
errorOnConflict
. - Throws an exception if there's a conflict in multiple YAML files.
- The strategy name is
- OverrideMergeStrategy
- The strategy name is
override
- Override the config files according to the loading order.
- The strategy name is
You can provide two YAML config files. They can be system and user config files. Then allow users to change their file and override the system configuration.
There are two ways to configure the strategy name.
- set the environment
CASC_MERGE_STRATEGY
- set the system property
casc.merge.strategy
The strategy name could be errorOnConflict
or override
.