37 lines
12 KiB
Markdown
37 lines
12 KiB
Markdown
---
|
|
gitea: none
|
|
include_toc: true
|
|
---
|
|
[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md)
|
|
|
|
## Export configuration to environment variables
|
|
|
|
> [!NOTE]
|
|
>
|
|
> Exporting the configuration as an environment variable makes it available to applications that require this type of variable (scripts, Twelve-Factor Apps, etc.).\
|
|
> \
|
|
> You can use it, with the appropriate .rougailconf.yaml file, by doing: "source <(rougail)".\
|
|
> \
|
|
> Note: A variable within a "sequence" that is disabled for a specific index will be replaced by an empty string.\
|
|
> **Path**: environment\
|
|
> *`disabled`*\
|
|
> **Disabled**: when the variable "[select for output](#step.output)" is accessible and hasn't the value "environment".
|
|
|
|
### Configuration for output environment
|
|
|
|
> [!NOTE]
|
|
>
|
|
> **Path**: environment.output\
|
|
> *`disabled`*\
|
|
> **Disabled**: when the variable "[select for output](#step.output)" is accessible and hasn't the value "environment".
|
|
|
|
| Variable | Description | Default value | Type | Access control | Validator |
|
|
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|
|
|
| **<a id="environment.output.prefix" name="environment.output.prefix">environment.output.prefix</a>**<br/>**Command line**: <br/>--environment.output.prefix<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.OUTPUT.PREFIX | Add prefix to environment variables. | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | | |
|
|
| **<a id="environment.output.boolean_type" name="environment.output.boolean_type">environment.output.boolean_type</a>**<br/>**Command line**: <br/>--environment.output.boolean_type<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.OUTPUT.BOOLEAN_TYPE | Booleans are converted into.<br/>There is no boolean in shell, so we have to convert it<br/><br/>"string" means the string "true" or "false"<br/><br/>"number" means the number "1" or "0". | string | [`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | **Choices**: <br/>• string<br/>• number |
|
|
| **<a id="environment.output.upper" name="environment.output.upper">environment.output.upper</a>**<br/>**Command line**: <br/>• --environment.output.upper<br/>• --environment.output.no-upper<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.OUTPUT.UPPER | Variables name are upper. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | |
|
|
| **<a id="environment.output.path_is_variable_name" name="environment.output.path_is_variable_name">environment.output.path_is_variable_name</a>**<br/>**Command line**: <br/>• --environment.output.path_is_variable_name<br/>• --environment.output.no-path_is_variable_name<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.OUTPUT.PATH_IS_VARIABLE_NAME | The variables name is, in fact, the path. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | |
|
|
| **<a id="environment.output.custom_separator" name="environment.output.custom_separator">environment.output.custom_separator</a>**<br/>**Command line**: <br/>--environment.output.custom_separator<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.OUTPUT.CUSTOM_SEPARATOR | Replace the separator character "." in path by an other.<br/>The character dot (".") may not be allowed in the environment variable name. | _ | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | *`disabled`*<br/>**Disabled**: when the variable "[The variables name is, in fact, the path](#environment.output.path_is_variable_name)" has the value "false". | |
|
|
| **<a id="environment.output.multi_in_array" name="environment.output.multi_in_array">environment.output.multi_in_array</a>**<br/>**Command line**: <br/>• --environment.output.multi_in_array<br/>• --environment.output.no-multi_in_array<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.OUTPUT.MULTI_IN_ARRAY | Multiple values variable will be loaded in a array.<br/>Not all shells support arrays. This feature is not POSIX-compatible, it's a Bash-specific feature (other shells like zsh or ksh also support arrays).<br/><br/>If your shell supports arrays, it is preferable to use them to iterate over the values in the list. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | |
|
|
| **<a id="environment.output.multi_separator" name="environment.output.multi_separator">environment.output.multi_separator</a>**<br/>**Command line**: <br/>--environment.output.multi_separator<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.OUTPUT.MULTI_SEPARATOR | The separator for multiple values variable. | ; | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *`disabled`*<br/>**Disabled**: when the variable "[Multiple values variable will be loaded in a array](#environment.output.multi_in_array)" has the value "true". | |
|
|
| **<a id="environment.output.submulti_separator" name="environment.output.submulti_separator">environment.output.submulti_separator</a>**<br/>**Command line**: <br/>--environment.output.submulti_separator<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.OUTPUT.SUBMULTI_SEPARATOR | The separator for sub multiple values variable. | if "[Multiple values variable will be loaded in a array](#environment.output.multi_in_array)" the value is ";" otherwise the value is ",". | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | |
|