This plugin is currently under development and may undergo significant changes. For more details, see the proposal issue here.
Leveraging the IF framework's extensibility, the IF Branch Plugin introduces conditional input duplication. It scans the manifest's component-config
for the branch-on
directive, which dictates the creation of input variants based on specified fields and their new values.
For instance, to branch on the region
field, the manifest's component-config
would be:
plugins:
branch-on:
path: if-branch-plugin
method: Branch
...
tree:
children:
child-1:
pipeline:
- branch-on
config:
branch-on:
region:
- uk-north
Upon execution, the plugin will process each input, checking for the presence of branch-on fields. When a match is found, it duplicates the input, substituting the original value with each listed in branch-on, thus expanding the input set for diverse scenario testing.
Example manifests can be found in /manifests
and tested with run.sh
(described below).
Branch Plugin Demo Video (last updated: Apr 8, 2024)
To test sample manifests using run.sh
, follow these steps:
- Ensure you have
npm
,jq
, andyq
installed on your system. - Place your manifest file in an accessible directory.
- Run the script with the path to your manifest file as an argument:
./run.sh path/to/manifest.yml
Output will be saved to /outputs/<manifest-name>.yml