when trying to use a secret variable with a value containing dollar sign on gitlab-ci secret variables it's not got variable value correctly.
the solution is to set the dollar sign twice, for example, if your variable value is 123$567
put it like this: 123$$567
While escaping $
(with $$
) is one way, but GitLab 15.7 (December 2022) adds another option:
Support the
$
character in CI/CD variablesSupport the
$
character in CI/CD variablesPreviously, using the
$
character in a CI/CD variable always indicated the start of a reference another variable, which GitLab then tried to expand.
As a result, you could not have a value with a$
as part of the string unless it was escaped, which can be confusing.In this release, we are introducing a new setting for project, group, and instance CI/CD variables.
You can now toggle whether or not GitLab interprets the CI/CD variable as a raw string, or treats a
$
as the start of another variable that should be expanded.See Documentation and Issue.
© 2022 - 2024 — McMap. All rights reserved.