From f68d7c87fee6c5f101785212b581f8fd152ba700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sarp=20Bak=C4=B1=C5=9F?= Date: Mon, 23 Mar 2026 22:04:04 +0300 Subject: [PATCH 1/2] Env. Group Updates --- .../build-environment-variables/index.md | 163 ++++++++++++------ .../publish-module/publish-variables/index.md | 151 +++++++++++----- 2 files changed, 221 insertions(+), 93 deletions(-) diff --git a/docs/build/build-environment-variables/index.md b/docs/build/build-environment-variables/index.md index 6bdf9d799..0a348c76c 100644 --- a/docs/build/build-environment-variables/index.md +++ b/docs/build/build-environment-variables/index.md @@ -12,15 +12,15 @@ import ContentRef from '@site/src/components/ContentRef'; ### Creating environment variable groups -To create an environment variable group, select Environment Variables from the build module. Click on the orange + icon and enter the name of the group into the input box, press enter to save the group name and create the group. +To create an environment variable group, select Environment Variables from the build module. Click on the orange **...** icon and select '**Add Variable Group**'. Then, enter the name of the group into the input box, and press Enter to create the group. - + ### Adding key and text-based value pairs To add an environment variable to the group, select the "Text" tab from the top and use the inputs below. Enter a key name, then enter the value for the key and press enter. - + You can add as many environment variables as you need. @@ -32,7 +32,7 @@ Variables that need to be secret can be hidden using the lock icon. Such variabl Please note that some environment variables may need to be duplicated to be used in different groups for different purposes. - + ### Adding files as environment variables @@ -42,9 +42,9 @@ To add a file, select the "File" tab from the top and enter a key name from the Then press add to upload the file. - + - + :::info @@ -52,72 +52,139 @@ When you upload a file as an environment variable, file name is not preserved. T ::: -### Downloading environment variables +:::tip Editing Encrypted Variables +You can edit encrypted variables by clicking the Edit option, just like text variables. The original value will not be displayed for security reasons; however, the updated value will be saved. +::: + +### Exporting environment variable groups + +You can export environment variable groups in bulk as a `.zip` file. + +To export variable groups, click on the three dots icon next to **Variable Groups** and select **Export Variable Group**. + + -You can download and view environment variables in **JSON** format. For this, you can use the "Download" button by clicking on the three dots next to one of the variable groups under "Build > Environment Variables > Variable Groups". + -In the downloaded file content, you will see a structure with **key-value** pairs. +In the export modal: -In addition, if the value part of the environment variable is set to hidden during the text-based environment variable addition process, the "isSecret" value will be `true` and the key, along with the value **will not** be listed in the downloaded file. The same rule is valid for file type variables. If it is not hidden, this value will be `false`, and the value will be visible. +- You can select one or more environment variable groups (e.g., Prod, Dev, Staging). +- All selected groups will be included in the exported file. +- The export will be downloaded as a `.zip` file. - + :::info -An example of environment variable downloaded as a JSON file: +- Secret variables and file contents are not exposed directly for security reasons. +- Exporting multiple groups at once helps you back up or migrate configurations easily. +::: + +An example of environment variable group downloaded as a JSON file: ```json [ - { - "key": "API_URL", - "value": "https://api.example.com", - "isSecret": false, - "isFile": false, - "id": "API_URL" - } -] + {"Id":"8260f439-d074-4f10-9361-66fe96480904", + "Name":"Prod", + "Variables": + [ + {"Key":"API_URL", + "Value":"https://qa.example.com", + "IsSecret":false,"IsFile":false}, + {"Key":"API_SECRET", + "Value":"", + "IsSecret":true,"IsFile":false}, + {"Key":"API_KEY", + "Value":"", + "IsSecret":true,"IsFile":false}, + {"Key":"TestFile", + "Value":"ac_post_process_output-2.json", + "IsSecret":false,"IsFile":true}]}, + {"Id":"03bc80ee-972d-4214-9963-a4bfa8fd2d1c", + "Name":"Dev", + "Variables": + [{"Key":"test", + "Value":"", + "IsSecret":true,"IsFile":false}]}, + {"Id":"f71c685c-5844-4099-9561-a12e76f667bd", + "Name":"Staging", + "Variables": + [{"Key":"test2", + "Value":"", + "IsSecret":true,"IsFile":false}] + }] ``` As seen in the example above; - if the **isSecret** value is `false`, it has visible value - if the **isSecret** value is `true` or **isFile** value is `true` , the key and the value will not be downloaded. -::: -### Uploading environment variables +### Importing environment variable groups -The Upload feature allows users to bulk-import environment variables into any existing Variable Group (e.g., Staging, Prod, or Dev) within the Build > Environment Variables section. +You can import environment variable groups in bulk using a `.zip` file. -This feature streamlines the process of configuring variables by enabling users to upload a predefined JSON file instead of manually entering each variable. +To import variable groups, click on the three dots icon next to **Variable Groups** and select **Import Variable Group**. -The uploadable file must be a `.json` file with an array of variable objects. Each variable object must include the following fields: + - + -```json -[ -{ -"key": "API_URL", -"value": "https://api.example.com", -"isSecret": false, -"isFile": false, -"id": "API_URL" -}, -{ -"key": "API_KEY", -"value": "12345-abcde-67890-fghij", -"isSecret": true, -"isFile": false, -"id": "API_KEY" -} -] -``` +In the import flow: + +1. Upload a `.zip` file that contains environment variable groups. +2. On the next screen, select the groups you want to import. +3. Review the variables within each group before confirming. + + + + +If a variable group or variable already exists, it will be marked with an `Exists` tag. + +You can control how conflicts are handled using the following options: + +- **Overwrite if there is existing group**: Replaces the entire group and all its variables. +- **Overwrite if there is existing variables**: Updates only the existing variables with new values. + + -:::warning -- File type variables (isFile: `true`) cannot be uploaded using JSON. These must be added manually via the UI. -- The Download feature does not include secret values or file contents for security reasons. -- You can edit your own JSON files to update variables in a group. However, duplicated keys are not allowed. +:::info +- Existing variables or groups will not be overwritten unless the corresponding overwrite option is enabled. +- File-based variables are included in the import process via the `.zip` file. ::: +### Sharing environment variable groups + +You can share environment variable groups from the root organization to sub-organizations. + +To share a variable group, click on the three dots icon next to a group and select **Share**. + + + +In the share modal: + +- You can select specific sub-organizations to share the variable group with. + + + +- Optionally, enable **Share with all sub-organizations** to automatically share the group with all existing and future sub-organizations. + + + +After sharing: + +- Shared variable groups will be marked with a **Shared** tag in the root organization. + + + +- In sub-organizations, these groups will appear with an **Inherited** tag. + + + +:::info +- Users in sub-organizations cannot edit, rename, or delete inherited variable groups. +- Any updates made in the root organization will be reflected in all shared sub-organizations. + ::: + #### Using environment variable groups in builds Environment variable groups can be used in builds to extend the workflow and add additional actions to workflow steps. diff --git a/docs/publish-module/publish-variables/index.md b/docs/publish-module/publish-variables/index.md index e575fdb13..a60f477ae 100644 --- a/docs/publish-module/publish-variables/index.md +++ b/docs/publish-module/publish-variables/index.md @@ -10,11 +10,13 @@ import ContentRef from '@site/src/components/ContentRef'; The **Publish Variables** section within the Publish to Stores module is a feature that allows you to set up and manage key-value pairs that are essential for the app publishing process. - + To use these defined variables, it will be necessary to select them from the [Publish Settings](/publish-to-stores-module/publish-settings/). -Publish Variables are key-value pairs that can be used to store configuration settings, credentials, and other data required during the publish process. You can add new variables directly in the Publish Variables section without the need for an additional menu or button. +Publish Variables are key-value pairs that can be used to store configuration settings, credentials, and other data required during the publish process. You can add new variables directly in the Publish Variables section without the need for an additional menu or button. You can also import or export publish variable groups in bulk from the three dots menu next to **Variable Groups**. + + ## How to Add a New Publish Variable @@ -49,75 +51,134 @@ In the example provided: Remember to handle these variables with care, especially if they contain sensitive information such as passwords, tokens, or API keys. :::info - Please note that Publish Variables can only be used within the Publish to Stores module. +::: +:::tip Editing Encrypted Variables +You can edit encrypted variables by clicking the Edit option, just like text variables. The original value will not be displayed for security reasons; however, the updated value will be saved. ::: -### Downloading environment variables +### Exporting publish variable groups + +You can export publish variable groups in bulk as a `.zip` file. -You can download and view environment variables in **JSON** format. For this, you can use the "Download" button by clicking on the three dots next to one of the variable groups under "Publish > Publish Variables > Variable Groups". +To export variable groups, click on the three dots icon next to **Variable Groups** and select **Export Variable Group**. -In the downloaded file content, you will see a structure with **key-value** pairs. + -In addition, if the value part of the environment variable is set to hidden during the text-based environment variable addition process, the "isSecret" value will be `true` and the key, along with the value **will not** be listed in the downloaded file. The same rule is valid for file type variables. If it is not hidden, this value will be `false`, and the value will be visible. + - +In the export modal: + +- You can select one or more publish variable groups. +- All selected groups will be included in the exported file. +- The export will be downloaded as a `.zip` file. + + :::info -An example of publish variable downloaded as a JSON file: +- Secret variables and file contents are not exposed directly for security reasons. +- Exporting multiple groups at once helps you back up or migrate configurations more easily. +::: ```json [ - { - "key": "API_URL", - "value": "https://api.example.com", - "isSecret": false, - "isFile": false, - "id": "API_URL" - } -] + {"Id":"8260f439-d074-4f10-9361-66fe96480904", + "Name":"Prod", + "Variables": + [ + {"Key":"API_URL", + "Value":"https://qa.example.com", + "IsSecret":false,"IsFile":false}, + {"Key":"API_SECRET", + "Value":"", + "IsSecret":true,"IsFile":false}, + {"Key":"API_KEY", + "Value":"", + "IsSecret":true,"IsFile":false}, + {"Key":"TestFile", + "Value":"ac_post_process_output-2.json", + "IsSecret":false,"IsFile":true}]}, + {"Id":"03bc80ee-972d-4214-9963-a4bfa8fd2d1c", + "Name":"Dev", + "Variables": + [{"Key":"test", + "Value":"", + "IsSecret":true,"IsFile":false}]}, + {"Id":"f71c685c-5844-4099-9561-a12e76f667bd", + "Name":"Staging", + "Variables": + [{"Key":"test2", + "Value":"", + "IsSecret":true,"IsFile":false}] + }] ``` As seen in the example above; - if the **isSecret** value is `false`, it has visible value - if the **isSecret** value is `true` or **isFile** value is `true` , the key and the value will not be downloaded. - ::: -### Uploading environment variables +### Importing publish variable groups -The Upload feature allows users to bulk-import environment variables into any existing Variable Group (e.g., Staging, Prod, or Dev) within the Publish > Publish Variables > Variable Groups section. +You can import publish variable groups in bulk using a `.zip` file. -This feature streamlines the process of configuring variables by enabling users to upload a predefined JSON file instead of manually entering each variable. +To import variable groups, click on the three dots icon next to **Variable Groups** and select **Import Variable Group**. -The uploadable file must be a `.json` file with an array of variable objects. Each variable object must include the following fields: + - + -```json -[ -{ -"key": "API_URL", -"value": "https://api.example.com", -"isSecret": false, -"isFile": false, -"id": "API_URL" -}, -{ -"key": "API_KEY", -"value": "12345-abcde-67890-fghij", -"isSecret": true, -"isFile": false, -"id": "API_KEY" -} -] -``` +In the import flow: +1. Upload a `.zip` file that contains publish variable groups. +2. On the next screen, select the groups you want to import. +3. Review the variables within each group before confirming. + +If a variable group or variable already exists, it will be marked with an `Exists` tag. + + + +You can control how conflicts are handled using the following options: + +- **Overwrite if there is existing group**: Replaces the entire group and all its variables. +- **Overwrite if there is existing variables**: Updates only the existing variables with new values. + + + +:::info +- Existing variables or groups will not be overwritten unless the corresponding overwrite option is enabled. +- File-based variables are included in the import process via the `.zip` file. +::: + +### Sharing environment variable groups + +You can share environment variable groups from the root organization to sub-organizations. + +To share a variable group, click on the three dots icon next to a group and select **Share**. + + + +In the share modal: + +- You can select specific sub-organizations to share the variable group with. -:::warning -- File type variables (isFile: `true`) cannot be uploaded using JSON. These must be added manually via the UI. -- The Download feature does not include secret values or file contents for security reasons. -- You can edit your own JSON files to update variables in a group. However, duplicated keys are not allowed. + + +- Optionally, enable **Share with all sub-organizations** to automatically share the group with all existing and future sub-organizations. + +After sharing: + +- Shared variable groups will be marked with a **Shared** tag in the root organization. + + + +- In sub-organizations, these groups will appear with an **Inherited** tag. + + + +:::info +- Users in sub-organizations cannot edit, rename, or delete inherited variable groups. +- Any updates made in the root organization will be reflected in all shared sub-organizations. ::: ## Reserved Variables From c43c9e024418ec1a9d99e8e9b1ee8e6288b15d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sarp=20Bak=C4=B1=C5=9F?= Date: Mon, 23 Mar 2026 22:08:27 +0300 Subject: [PATCH 2/2] fix --- docs/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 840c488ba..e92538687 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -611,7 +611,7 @@ You cannot upgrade directly from `3.28.3` or an older version to `3.29.3` or lat ### 🆕 New Features -- Downloaded Variable Group JSON files can now be [uploaded](/build/build-environment-variables#uploading-environment-variables) to existing or newly created variable groups for easier transmission. Alternatively, users can create their own JSON files and upload them, provided they follow the correct format. +- Downloaded Variable Group JSON files can now be uploaded to existing or newly created variable groups for easier transmission. Alternatively, users can create their own JSON files and upload them, provided they follow the correct format. - The Binary Details sections of the [Enterprise App Store](/enterprise-app-store/enterprise-app-store-profile#binary-information) and [Testing Distribution](/testing-distribution/create-or-select-a-distribution-profile#binary-information) profiles will now display build metadata details, including trigger type, workflow name, source branch and more. ### :muscle: Improvements