Configuration
To run eMERGEnce you need at least a Run Config and optionally also a Repository Config.
Run Config
The run config is the main configuration needed to actually run eMERGEnce. This is the one that you have to specify using the --config option. In this file you specify the VCS repositories that you want to run emergence on, and optionally some default conditions/settings as well.
The format of the file looks like this:
repositories:
- name: fgrutsch/test-repo
conditions:
- "build-success-all"
merge:
strategy: fast-forward
close_source_branch: false
- name: fgrutsch/test-repo-2
defaults:
conditions:
- "author == ci-user"
merge:
strategy: squash
close_source_branch: true
repositories.[0].conditionsattribute is optionalrepositories.[0].mergeattribute as well as its nested attributes are optionaldefaultsattribute as well as its nested attributes are optional. If specified, this applys defaults for all configured repositories. If missing, defaults tostrategy: squashandclose_source_branch: true- Be aware that you need at least one condition to run eMERGEnce (after all configs are resolved)
Repository Config
If you would rather like to configure eMERGEnce settings on a repository level then you can do this by creating an .emergence.yml (configurable using the --repo-config-name option) in the root of your repository. The format of the file looks like this:
conditions:
- "author == ci-user"
merge:
strategy: squash
close_source_branch: true
conditionsattribute is optionalmergeattribute as well as its nested attributes are optional
Resolver
The conditions and merge settings are resolved with a given priority using this strategy (from lowest to highest):
defaultsfrom the Run Configrepositories.[i]from the Run Config- Repository Config
For example if your Run Config looks like this:
repositories:
- name: fgrutsch/my-repo
conditions:
- "build-success-all"
merge:
strategy: fast-forward
close_source_branch: true
defaults:
merge:
strategy: merge-commit
close_source_branch: false
conditions:
- "author == emergence"
and your Repository Config like this:
conditions:
- "source-branch ^$ ^update\/.+$"
- "target-branch == master"
merge:
strategy: squash
close_source_branch: false
then eMERGEnce will use the follwing settings:
- Conditions:
- “build-success-all”
- “author == emergence”
- “target-branch == master”
- Merge
- Strategy: squash
- Close Source Branch: false
Conditions are combined instead of overwritten!