fix: support output environment

This commit is contained in:
egarette@silique.fr 2026-07-09 07:32:49 +02:00
parent ed1cdc815a
commit 96d18dc9f6
6 changed files with 77 additions and 43 deletions

View file

@ -19,8 +19,8 @@ include_toc: true
> *`désactivé`*\ > *`désactivé`*\
> **Désactivé** : si environment n'est pas défini dans "[sélection pour user data](#step.user_data)". > **Désactivé** : si environment n'est pas défini dans "[sélection pour user data](#step.user_data)".
| Variable | Description | Valeur par défaut | Type | Validateur | | Variable | Description | Valeur par défaut | Type | Contrôle des accès | Validateur |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|---------------------------------------------------------------------------------------------------|------------------------------------------------------| |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|
| **<a id="environment.default_environment_name" name="environment.default_environment_name">environment.default_environment_name</a>**<br/>**Ligne de commande** : <br/>--environment.default_environment_name<br/>**Variable d'environnement** : ROUGAILCLI_ENVIRONMENT.DEFAULT_ENVIRONMENT_NAME | Nom du préfix d&#x27;environnement par défaut. | ROUGAIL | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | Doit seulement utiliser des caractères en majuscule. | | **<a id="environment.default_environment_name" name="environment.default_environment_name">environment.default_environment_name</a>**<br/>**Ligne de commande** : <br/>--environment.default_environment_name<br/>**Variable d'environnement** : ROUGAILCLI_ENVIRONMENT.DEFAULT_ENVIRONMENT_NAME | Nom du préfix d&#x27;environnement par défaut. | ROUGAIL | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | *`désactivé`*<br/>**Désactivé** : si "__.main_namespace" est à null ou environment n'est pas défini dans "[sélection pour user data](#step.user_data)". | Doit seulement utiliser des caractères en majuscule. |
| **<a id="environment.custom_separator" name="environment.custom_separator">environment.custom_separator</a>**<br/>**Ligne de commande** : <br/>--environment.custom_separator<br/>**Variable d'environnement** : ROUGAILCLI_ENVIRONMENT.CUSTOM_SEPARATOR | Remplace le caractère séparateur « . » dans les chemins par un autre.<br/>Le caractère point (« . ») peut ne pas être autorisé dans le nom de la variable d&#x27;environnement. Attention, le nom de la variable avec des points est toujours disponible en plus du nom avec ce caractère. | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | | | **<a id="environment.custom_separator" name="environment.custom_separator">environment.custom_separator</a>**<br/>**Ligne de commande** : <br/>--environment.custom_separator<br/>**Variable d'environnement** : ROUGAILCLI_ENVIRONMENT.CUSTOM_SEPARATOR | Remplace le caractère séparateur « . » dans les chemins par un autre.<br/>Le caractère point (« . ») peut ne pas être autorisé dans le nom de la variable d&#x27;environnement. Attention, le nom de la variable avec des points est toujours disponible en plus du nom avec ce caractère. | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | *`désactivé`*<br/>**Désactivé** : si environment n'est pas défini dans "[sélection pour user data](#step.user_data)". | |
| **<a id="environment.with_secrets" name="environment.with_secrets">environment.with_secrets</a>**<br/>**Ligne de commande** : <br/>&nbsp;--environment.with_secrets<br/>&nbsp;--environment.no-with_secrets<br/>**Variable d'environnement** : ROUGAILCLI_ENVIRONMENT.WITH_SECRETS | Les variables d&#x27;environnement peuvent contenir des secrets. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | | | **<a id="environment.with_secrets" name="environment.with_secrets">environment.with_secrets</a>**<br/>**Ligne de commande** : <br/>&nbsp;--environment.with_secrets<br/>&nbsp;--environment.no-with_secrets<br/>**Variable d'environnement** : ROUGAILCLI_ENVIRONMENT.WITH_SECRETS | Les variables d&#x27;environnement peuvent contenir des secrets. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `obligatoire` | *`désactivé`*<br/>**Désactivé** : si environment n'est pas défini dans "[sélection pour user data](#step.user_data)". | |

View file

@ -19,8 +19,8 @@ include_toc: true
> *`disabled`*\ > *`disabled`*\
> **Disabled**: if environment is not set in "[select for user data](#step.user_data)". > **Disabled**: if environment is not set in "[select for user data](#step.user_data)".
| Variable | Description | Default value | Type | Validator | | Variable | Description | Default value | Type | Access control | Validator |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|-------------------------------------------------------------------------------------------------|--------------------------------------| |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|-------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------|
| **<a id="environment.default_environment_name" name="environment.default_environment_name">environment.default_environment_name</a>**<br/>**Command line**: <br/>--environment.default_environment_name<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.DEFAULT_ENVIRONMENT_NAME | Name of the default environment prefix. | ROUGAIL | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Should only use uppercase character. | | **<a id="environment.default_environment_name" name="environment.default_environment_name">environment.default_environment_name</a>**<br/>**Command line**: <br/>--environment.default_environment_name<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.DEFAULT_ENVIRONMENT_NAME | Name of the default environment prefix. | ROUGAIL | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *`disabled`*<br/>**Disabled**: if "__.main_namespace" is null or environment is not set in "[select for user data](#step.user_data)". | Should only use uppercase character. |
| **<a id="environment.custom_separator" name="environment.custom_separator">environment.custom_separator</a>**<br/>**Command line**: <br/>--environment.custom_separator<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.CUSTOM_SEPARATOR | Replace the separator character &quot;.&quot; in path by an other.<br/>The character dot (&quot;.&quot;) may not be allowed in the environment variable name. Note that the variable name with dots is always available in addition to the name with this character. | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | | | **<a id="environment.custom_separator" name="environment.custom_separator">environment.custom_separator</a>**<br/>**Command line**: <br/>--environment.custom_separator<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.CUSTOM_SEPARATOR | Replace the separator character &quot;.&quot; in path by an other.<br/>The character dot (&quot;.&quot;) may not be allowed in the environment variable name. Note that the variable name with dots is always available in addition to the name with this character. | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | *`disabled`*<br/>**Disabled**: if environment is not set in "[select for user data](#step.user_data)". | |
| **<a id="environment.with_secrets" name="environment.with_secrets">environment.with_secrets</a>**<br/>**Command line**: <br/>&nbsp;--environment.with_secrets<br/>&nbsp;--environment.no-with_secrets<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.WITH_SECRETS | Environnement variables may contain secrets. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | | | **<a id="environment.with_secrets" name="environment.with_secrets">environment.with_secrets</a>**<br/>**Command line**: <br/>&nbsp;--environment.with_secrets<br/>&nbsp;--environment.no-with_secrets<br/>**Environment variable**: ROUGAILCLI_ENVIRONMENT.WITH_SECRETS | Environnement variables may contain secrets. | true | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *`disabled`*<br/>**Disabled**: if environment is not set in "[select for user data](#step.user_data)". | |

View file

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"POT-Creation-Date: 2026-06-13 06:47+0200\n" "POT-Creation-Date: 2026-07-09 07:30+0200\n"
"PO-Revision-Date: 2026-06-13 06:48+0200\n" "PO-Revision-Date: 2026-07-09 07:31+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: fr\n" "Language: fr\n"
@ -32,17 +32,17 @@ msgstr ""
"le nom d'une variable doit être un nom en minuscule lorsque vous voulez " "le nom d'une variable doit être un nom en minuscule lorsque vous voulez "
"utiliser de données utilisateur \"environment\", donc \"{0}\" est invalide" "utiliser de données utilisateur \"environment\", donc \"{0}\" est invalide"
#: src/rougail/user_data_environment/config.py:34 #: src/rougail/user_data_environment/config.py:33
msgid "Load user data from environment variables" msgid "Load user data from environment variables"
msgstr "Charge les variables d'environnement" msgstr "Charge les variables d'environnement"
#: src/rougail/user_data_environment/config.py:36 #: src/rougail/user_data_environment/config.py:35
msgid "Variable values can be defined directly from an environment variable." msgid "Variable values can be defined directly from an environment variable."
msgstr "" msgstr ""
"Les valeurs des variables peuvent être définies directement à partir d'une " "Les valeurs des variables peuvent être définies directement à partir d'une "
"variable d'environnement." "variable d'environnement."
#: src/rougail/user_data_environment/config.py:38 #: src/rougail/user_data_environment/config.py:37
msgid "" msgid ""
"Environnement variable names begin with a prefix (by default ROUGAIL_) " "Environnement variable names begin with a prefix (by default ROUGAIL_) "
"followed by the variable path in uppercase, for example: " "followed by the variable path in uppercase, for example: "
@ -54,7 +54,7 @@ msgstr ""
"ROUGAIL_MA_VARIABLE. Si vous utilisez des espaces de noms, le préfixe sera " "ROUGAIL_MA_VARIABLE. Si vous utilisez des espaces de noms, le préfixe sera "
"le nom de l'espace de noms en majuscule." "le nom de l'espace de noms en majuscule."
#: src/rougail/user_data_environment/config.py:40 #: src/rougail/user_data_environment/config.py:39
msgid "" msgid ""
"Note that variable paths can contain dots (\".\"), which are not permitted " "Note that variable paths can contain dots (\".\"), which are not permitted "
"everywhere. To avoid any issues, use the `env` command, for example: `env " "everywhere. To avoid any issues, use the `env` command, for example: `env "
@ -64,7 +64,7 @@ msgstr ""
"ne sont pas autorisés partout. Pour éviter tout problème, utilisez la " "ne sont pas autorisés partout. Pour éviter tout problème, utilisez la "
"commande `env`, par exemple : `env ROUGAIL_MA_FAMILLE.MA_VARIABLE=1 rougail`" "commande `env`, par exemple : `env ROUGAIL_MA_FAMILLE.MA_VARIABLE=1 rougail`"
#: src/rougail/user_data_environment/config.py:42 #: src/rougail/user_data_environment/config.py:41
msgid "" msgid ""
"For values, there is no difference between a number and a letter (they can " "For values, there is no difference between a number and a letter (they can "
"be enclosed in quotes or not). However, booleans are True or False. The " "be enclosed in quotes or not). However, booleans are True or False. The "
@ -74,23 +74,31 @@ msgstr ""
"(ils peuvent être entre guillemets ou non). Cependant, les booléens sont " "(ils peuvent être entre guillemets ou non). Cependant, les booléens sont "
"True ou False. Le séparateur pour les variables multiple est la virgule." "True ou False. Le séparateur pour les variables multiple est la virgule."
#: src/rougail/user_data_environment/config.py:47 #: src/rougail/user_data_environment/config.py:46
msgid "if environment is not set in \"step.user_data\"" msgid "if environment is not set in \"_.step.user_data\""
msgstr "si environment n'est pas défini dans \"step.user_data\"" msgstr "si environment n'est pas défini dans \"_.step.user_data\""
#: src/rougail/user_data_environment/config.py:50 #: src/rougail/user_data_environment/config.py:49
msgid "Name of the default environment prefix" msgid "Name of the default environment prefix"
msgstr "Nom du préfix d'environnement par défaut" msgstr "Nom du préfix d'environnement par défaut"
#: src/rougail/user_data_environment/config.py:56 #: src/rougail/user_data_environment/config.py:55
msgid "should only use uppercase character" msgid "should only use uppercase character"
msgstr "doit seulement utiliser des caractères en majuscule" msgstr "doit seulement utiliser des caractères en majuscule"
#: src/rougail/user_data_environment/config.py:62 #: src/rougail/user_data_environment/config.py:60
msgid ""
"if \"__.main_namespace\" is null or environment is not set in "
"\"__.step.user_data\""
msgstr ""
"si \"__.main_namespace\" est à null ou environment n'est pas défini dans "
"\"__.step.user_data\""
#: src/rougail/user_data_environment/config.py:63
msgid "Replace the separator character \".\" in path by an other" msgid "Replace the separator character \".\" in path by an other"
msgstr "Remplace le caractère séparateur « . » dans les chemins par un autre" msgstr "Remplace le caractère séparateur « . » dans les chemins par un autre"
#: src/rougail/user_data_environment/config.py:63 #: src/rougail/user_data_environment/config.py:64
msgid "" msgid ""
"The character dot (\".\") may not be allowed in the environment variable " "The character dot (\".\") may not be allowed in the environment variable "
"name. Note that the variable name with dots is always available in addition " "name. Note that the variable name with dots is always available in addition "
@ -100,11 +108,16 @@ msgstr ""
"variable d'environnement. Attention, le nom de la variable avec des points " "variable d'environnement. Attention, le nom de la variable avec des points "
"est toujours disponible en plus du nom avec ce caractère." "est toujours disponible en plus du nom avec ce caractère."
#: src/rougail/user_data_environment/config.py:67 #: src/rougail/user_data_environment/config.py:70
#: src/rougail/user_data_environment/config.py:79
msgid "if environment is not set in \"__.step.user_data\""
msgstr "si environment n'est pas défini dans \"__.step.user_data\""
#: src/rougail/user_data_environment/config.py:73
msgid "Environnement variables may contain secrets" msgid "Environnement variables may contain secrets"
msgstr "Les variables d'environnement peuvent contenir des secrets" msgstr "Les variables d'environnement peuvent contenir des secrets"
#: src/rougail/user_data_environment/data.py:64 #: src/rougail/user_data_environment/data.py:66
msgid "environment variable" msgid "environment variable"
msgstr "les variables d'environnement" msgstr "les variables d'environnement"

View file

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2026-06-13 06:49+0200\n" "POT-Creation-Date: 2026-07-09 07:32+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -23,51 +23,60 @@ msgstr ""
msgid "variable name must be a lowercase name when we want to use user data \"environment\", so \"{0}\" is invalid" msgid "variable name must be a lowercase name when we want to use user data \"environment\", so \"{0}\" is invalid"
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:34 #: src/rougail/user_data_environment/config.py:33
msgid "Load user data from environment variables" msgid "Load user data from environment variables"
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:36 #: src/rougail/user_data_environment/config.py:35
msgid "Variable values can be defined directly from an environment variable." msgid "Variable values can be defined directly from an environment variable."
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:38 #: src/rougail/user_data_environment/config.py:37
msgid "Environnement variable names begin with a prefix (by default ROUGAIL_) followed by the variable path in uppercase, for example: ROUGAIL_MY_VARIABLE. If you are using namespaces, the prefix is the name of the namespace in uppercase." msgid "Environnement variable names begin with a prefix (by default ROUGAIL_) followed by the variable path in uppercase, for example: ROUGAIL_MY_VARIABLE. If you are using namespaces, the prefix is the name of the namespace in uppercase."
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:40 #: src/rougail/user_data_environment/config.py:39
msgid "Note that variable paths can contain dots (\".\"), which are not permitted everywhere. To avoid any issues, use the `env` command, for example: `env ROUGAIL_MY_FAMILY.MY_VARIABLE=1 rougail`" msgid "Note that variable paths can contain dots (\".\"), which are not permitted everywhere. To avoid any issues, use the `env` command, for example: `env ROUGAIL_MY_FAMILY.MY_VARIABLE=1 rougail`"
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:42 #: src/rougail/user_data_environment/config.py:41
msgid "For values, there is no difference between a number and a letter (they can be enclosed in quotes or not). However, booleans are True or False. The separator for multiple variables is a comma." msgid "For values, there is no difference between a number and a letter (they can be enclosed in quotes or not). However, booleans are True or False. The separator for multiple variables is a comma."
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:47 #: src/rougail/user_data_environment/config.py:46
msgid "if environment is not set in \"step.user_data\"" msgid "if environment is not set in \"_.step.user_data\""
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:50 #: src/rougail/user_data_environment/config.py:49
msgid "Name of the default environment prefix" msgid "Name of the default environment prefix"
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:56 #: src/rougail/user_data_environment/config.py:55
msgid "should only use uppercase character" msgid "should only use uppercase character"
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:62 #: src/rougail/user_data_environment/config.py:60
msgid "Replace the separator character \".\" in path by an other" msgid "if \"__.main_namespace\" is null or environment is not set in \"__.step.user_data\""
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:63 #: src/rougail/user_data_environment/config.py:63
msgid "Replace the separator character \".\" in path by an other"
msgstr ""
#: src/rougail/user_data_environment/config.py:64
msgid "The character dot (\".\") may not be allowed in the environment variable name. Note that the variable name with dots is always available in addition to the name with this character." msgid "The character dot (\".\") may not be allowed in the environment variable name. Note that the variable name with dots is always available in addition to the name with this character."
msgstr "" msgstr ""
#: src/rougail/user_data_environment/config.py:67 #: src/rougail/user_data_environment/config.py:70
#: src/rougail/user_data_environment/config.py:79
msgid "if environment is not set in \"__.step.user_data\""
msgstr ""
#: src/rougail/user_data_environment/config.py:73
msgid "Environnement variables may contain secrets" msgid "Environnement variables may contain secrets"
msgstr "" msgstr ""
#: src/rougail/user_data_environment/data.py:64 #: src/rougail/user_data_environment/data.py:66
msgid "environment variable" msgid "environment variable"
msgstr "" msgstr ""

View file

@ -43,7 +43,7 @@ environment:
jinja: | jinja: |
{{{{ _.step.user_data is propertyerror or 'environment' not in _.step.user_data }}}} {{{{ _.step.user_data is propertyerror or 'environment' not in _.step.user_data }}}}
return_type: boolean return_type: boolean
description: {_('if environment is not set in "step.user_data"')} description: {_('if environment is not set in "_.step.user_data"')}
default_environment_name: default_environment_name:
description: {_("Name of the default environment prefix")} description: {_("Name of the default environment prefix")}
@ -54,17 +54,29 @@ environment:
return_type: boolean return_type: boolean
description: {_("should only use uppercase character")} description: {_("should only use uppercase character")}
disabled: disabled:
variable: __.main_namespace jinja: |
when_not: null {{{{ not __.main_namespace or 'environment' not in __.step.user_data }}}}
return_type: boolean
description: {_('if "__.main_namespace" is null or environment is not set in "__.step.user_data"')}
custom_separator: custom_separator:
description: {_('Replace the separator character "." in path by an other')} description: {_('Replace the separator character "." in path by an other')}
help: {_('The character dot (".") may not be allowed in the environment variable name. Note that the variable name with dots is always available in addition to the name with this character.')} help: {_('The character dot (".") may not be allowed in the environment variable name. Note that the variable name with dots is always available in addition to the name with this character.')}
mandatory: false mandatory: false
disabled:
jinja: |
{{{{ 'environment' not in __.step.user_data }}}}
return_type: boolean
description: {_('if environment is not set in "__.step.user_data"')}
with_secrets: with_secrets:
description: {_("Environnement variables may contain secrets")} description: {_("Environnement variables may contain secrets")}
default: true default: true
disabled:
jinja: |
{{{{ 'environment' not in __.step.user_data }}}}
return_type: boolean
description: {_('if environment is not set in "__.step.user_data"')}
""" """
return { return {
"name": "environment", "name": "environment",