Commit 432d24ac authored by Matija Čupić's avatar Matija Čupić Committed by mfluharty

Expose javascript regex

parent ff3486a9
...@@ -27,4 +27,8 @@ module CiVariablesHelper ...@@ -27,4 +27,8 @@ module CiVariablesHelper
%w(File file) %w(File file)
] ]
end end
def ci_variable_maskable_regex
Maskable::REGEX.inspect.sub('\\A', '^').sub('\\z', '$').sub(/^\//, '').sub(/\/[a-z]*$/, '')
end
end end
...@@ -92,10 +92,9 @@ This means that the value of the variable will be hidden in job logs, ...@@ -92,10 +92,9 @@ This means that the value of the variable will be hidden in job logs,
though it must match certain requirements to do so: though it must match certain requirements to do so:
- The value must be in a single line. - The value must be in a single line.
- The value must contain only letters, numbers, or underscores. - The value must only consist of characters from the Base64 alphabet, defined in [RFC4648](https://tools.ietf.org/html/rfc4648).
- The value must be at least 8 characters long. - The value must be at least 8 characters long.
- The value must not use variables. - The value must not use variables.
- The value must only consist of characters from the Base64 alphabet, defined in [RFC4648](https://tools.ietf.org/html/rfc4648).
If the value does not meet the requirements above, then the CI variable will fail to save. If the value does not meet the requirements above, then the CI variable will fail to save.
In order to save, either alter the value to meet the masking requirements In order to save, either alter the value to meet the masking requirements
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment