@@ -185,14 +185,19 @@ For a deeper look into them, see [`.gitlab-ci.yml` defined variables](#gitlab-ci
...
@@ -185,14 +185,19 @@ For a deeper look into them, see [`.gitlab-ci.yml` defined variables](#gitlab-ci
#### Via the UI
#### Via the UI
From the UI, navigate to your project's **Settings > CI/CD** and
From within the UI, you can add or update custom environment variables:
expand **Variables**. Create a new variable by choosing its **type**, naming
it in the field **Input variable key**, and defining its value in the
**Input variable value** field:
![CI/CD settings - new variable](img/new_custom_variables_example.png)
1. Go to your project's **Settings > CI/CD** and expand the **Variables** section.
1. Click the **Add variable** button. In the **Add variable** modal, fill in the details:
You'll also see the option to mask and/or protect your variables.
- **Key**: Must be one line, with no spaces, using only letters, numbers, `-` or `_`.
- **Value**: No limitations.
- **Type**: `File` or `Variable`.
- **Environment scope**: `All`, or specific environments.
- **Protect variable** (Optional): If selected, the variable will only be available in pipelines that run on protected branches or tags.
- **Mask variable** (Optional): If selected, the variable's **Value** will be masked in job logs. The variable will fail to save if the value does not meet the [masking requirements](#masked-variables).
After a variable is created, you can update any of the details by clicking on the **{pencil}****Edit** button.
Once you've set the variables, call them from the `.gitlab-ci.yml` file:
Once you've set the variables, call them from the `.gitlab-ci.yml` file:
msgid "Allow users to request access (if visibility is public or internal)"
msgid "Allow users to request access (if visibility is public or internal)"
msgstr ""
msgstr ""
msgid "Allow variables to run on protected branches and tags."
msgstr ""
msgid "Allowed email domain restriction only permitted for top-level groups"
msgid "Allowed email domain restriction only permitted for top-level groups"
msgstr ""
msgstr ""
...
@@ -3796,7 +3793,7 @@ msgstr ""
...
@@ -3796,7 +3793,7 @@ msgstr ""
msgid "CiVariables|Cannot use Masked Variable with current value"
msgid "CiVariables|Cannot use Masked Variable with current value"
msgstr ""
msgstr ""
msgid "CiVariables|Environment Scope"
msgid "CiVariables|Environments"
msgstr ""
msgstr ""
msgid "CiVariables|Input variable key"
msgid "CiVariables|Input variable key"
...
@@ -5564,6 +5561,9 @@ msgstr ""
...
@@ -5564,6 +5561,9 @@ msgstr ""
msgid "Copy commit SHA"
msgid "Copy commit SHA"
msgstr ""
msgstr ""
msgid "Copy environment"
msgstr ""
msgid "Copy evidence SHA"
msgid "Copy evidence SHA"
msgstr ""
msgstr ""
...
@@ -5576,6 +5576,9 @@ msgstr ""
...
@@ -5576,6 +5576,9 @@ msgstr ""
msgid "Copy impersonation token"
msgid "Copy impersonation token"
msgstr ""
msgstr ""
msgid "Copy key"
msgstr ""
msgid "Copy labels and milestone from %{source_issuable_reference}."
msgid "Copy labels and milestone from %{source_issuable_reference}."
msgstr ""
msgstr ""
...
@@ -5600,6 +5603,9 @@ msgstr ""
...
@@ -5600,6 +5603,9 @@ msgstr ""
msgid "Copy trigger token"
msgid "Copy trigger token"
msgstr ""
msgstr ""
msgid "Copy value"
msgstr ""
msgid "Could not add admins as members"
msgid "Could not add admins as members"
msgstr ""
msgstr ""
...
@@ -6370,6 +6376,9 @@ msgstr ""
...
@@ -6370,6 +6376,9 @@ msgstr ""
msgid "Delete this attachment"
msgid "Delete this attachment"
msgstr ""
msgstr ""
msgid "Delete variable"
msgstr ""
msgid "DeleteProject|Failed to remove project repository. Please try again or contact administrator."
msgid "DeleteProject|Failed to remove project repository. Please try again or contact administrator."
msgstr ""
msgstr ""
...
@@ -8263,6 +8272,9 @@ msgstr ""
...
@@ -8263,6 +8272,9 @@ msgstr ""
msgid "Export this project with all its related data in order to move your project to a new GitLab instance. Once the export is finished, you can import the file from the \"New Project\" page."
msgid "Export this project with all its related data in order to move your project to a new GitLab instance. Once the export is finished, you can import the file from the \"New Project\" page."
msgstr ""
msgstr ""
msgid "Export variable to pipelines running on protected branches and tags only."
@@ -16728,6 +16743,9 @@ msgid_plural "Requires %d more approvals."
...
@@ -16728,6 +16743,9 @@ msgid_plural "Requires %d more approvals."
msgstr[0] ""
msgstr[0] ""
msgstr[1] ""
msgstr[1] ""
msgid "Requires values to meet regular expression requirements."
msgstr ""
msgid "Resend confirmation email"
msgid "Resend confirmation email"
msgstr ""
msgstr ""
...
@@ -19860,9 +19878,6 @@ msgstr ""
...
@@ -19860,9 +19878,6 @@ msgstr ""
msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
msgid "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."
msgstr ""
msgstr ""
msgid "There are currently no variables, add a variable with the Add Variable button below."
msgstr ""
msgid "There are no GPG keys associated with this account."
msgid "There are no GPG keys associated with this account."
msgstr ""
msgstr ""
...
@@ -19917,6 +19932,9 @@ msgstr ""
...
@@ -19917,6 +19932,9 @@ msgstr ""
msgid "There are no projects shared with this group yet"
msgid "There are no projects shared with this group yet"
msgstr ""
msgstr ""
msgid "There are no variables yet."
msgstr ""
msgid "There is a limit of %{ci_project_subscriptions_limit} subscriptions from or to a project."
msgid "There is a limit of %{ci_project_subscriptions_limit} subscriptions from or to a project."
msgstr ""
msgstr ""
...
@@ -20436,6 +20454,9 @@ msgstr ""
...
@@ -20436,6 +20454,9 @@ msgstr ""
msgid "This user will be the author of all events in the activity feed that are the result of an update, like new branches being created or new commits being pushed to existing branches. Upon creation or when reassigning you can only assign yourself to be the mirror user."
msgid "This user will be the author of all events in the activity feed that are the result of an update, like new branches being created or new commits being pushed to existing branches. Upon creation or when reassigning you can only assign yourself to be the mirror user."
msgstr ""
msgstr ""
msgid "This variable can not be masked"
msgstr ""
msgid "This will help us personalize your onboarding experience."
msgid "This will help us personalize your onboarding experience."
msgstr ""
msgstr ""
...
@@ -21373,9 +21394,6 @@ msgstr ""
...
@@ -21373,9 +21394,6 @@ msgstr ""
msgid "Update"
msgid "Update"
msgstr ""
msgstr ""
msgid "Update Variable"
msgstr ""
msgid "Update all"
msgid "Update all"
msgstr ""
msgstr ""
...
@@ -21394,6 +21412,9 @@ msgstr ""
...
@@ -21394,6 +21412,9 @@ msgstr ""
msgid "Update now"
msgid "Update now"
msgstr ""
msgstr ""
msgid "Update variable"
msgstr ""
msgid "Update your bookmarked URLs as filtered/sorted branches URL has been changed."
msgid "Update your bookmarked URLs as filtered/sorted branches URL has been changed."
msgstr ""
msgstr ""
...
@@ -22003,13 +22024,13 @@ msgstr ""
...
@@ -22003,13 +22024,13 @@ msgstr ""
msgid "Value Stream Analytics gives an overview of how much time it takes to go from idea to production in your project."
msgid "Value Stream Analytics gives an overview of how much time it takes to go from idea to production in your project."
msgstr ""
msgstr ""
msgid "Variable"
msgid "Var"
msgstr ""
msgstr ""
msgid "Variables"
msgid "Variable will be masked in job logs."
msgstr ""
msgstr ""
msgid "Variables will be masked in job logs. Requires values to meet regular expression requirements."