With Kaholo Configurations you can add variables as JSONs to your pipeline to use the same pipelines for different scenarios.
- Configurations are written in JSON format
- Data stored in Configurations can be used to fill in values in code fields dynamically
- Configurations can be triggered both manually and automatically
Reasons To Use Configurations
- Using the same CI/CD pipeline for different environments like Production and Staging which could have different values for things like Regions, IPs, etc.
- Using the same pipeline to provision user accounts and access rights based on user roles like Admin and Viewer. Each role in this case would have its own Configuration but using the same JSON data structure to configure different access levels.
- Enabling developers to self-serve environments while giving them various options to execute.
How To Choose A Configuration Upon Execution
When a pipeline is executed, it can use a particular configuration which is determined in several ways:
- Manually: When executing a pipeline in the user interface, you can choose a Configuration from the dropdown next to the ‘Execute’ button.
- Webhook Triggers: You can set up multiple triggers, each with a different configuration. For example, you could have one Github trigger listening to your Master branch which would use the ‘Production’ trigger, while having a second Github trigger listening to your feature branches that uses a ‘Staging’ configuration.
- Scheduled Triggers: When you use the scheduling feature, you have the option to set a specific configuration to use during the scheduled execution.
How To Access The Current Execution’s Configuration
In order to set a dynamic value at the time of execution, configuration data can be accessed from the Main Code Layer, Code Parameter Fields or any other code field as follows: