Refactor and add version text to variable syntax
This commit is contained in:
parent
97e8f49442
commit
9ef27250a0
1 changed files with 7 additions and 7 deletions
|
@ -482,7 +482,7 @@ Below you can find supported syntax reference:
|
||||||
|
|
||||||
> Example: `$VARIABLE == "some value"`
|
> Example: `$VARIABLE == "some value"`
|
||||||
|
|
||||||
> Example: `$VARIABLE != "some value"` _(added in 11.11)_
|
> Example: `$VARIABLE != "some value"` (introduced in GitLab 11.11)
|
||||||
|
|
||||||
You can use equality operator `==` or `!=` to compare a variable content to a
|
You can use equality operator `==` or `!=` to compare a variable content to a
|
||||||
string. We support both, double quotes and single quotes to define a string
|
string. We support both, double quotes and single quotes to define a string
|
||||||
|
@ -493,7 +493,7 @@ Below you can find supported syntax reference:
|
||||||
|
|
||||||
> Example: `$VARIABLE == null`
|
> Example: `$VARIABLE == null`
|
||||||
|
|
||||||
> Example: `$VARIABLE != null` _(added in 11.11)_
|
> Example: `$VARIABLE != null` (introduced in GitLab 11.11)
|
||||||
|
|
||||||
It sometimes happens that you want to check whether a variable is defined
|
It sometimes happens that you want to check whether a variable is defined
|
||||||
or not. To do that, you can compare a variable to `null` keyword, like
|
or not. To do that, you can compare a variable to `null` keyword, like
|
||||||
|
@ -504,7 +504,7 @@ Below you can find supported syntax reference:
|
||||||
|
|
||||||
> Example: `$VARIABLE == ""`
|
> Example: `$VARIABLE == ""`
|
||||||
|
|
||||||
> Example: `$VARIABLE != ""` _(added in 11.11)_
|
> Example: `$VARIABLE != ""` (introduced in GitLab 11.11)
|
||||||
|
|
||||||
If you want to check whether a variable is defined, but is empty, you can
|
If you want to check whether a variable is defined, but is empty, you can
|
||||||
simply compare it against an empty string, like `$VAR == ''` or non-empty
|
simply compare it against an empty string, like `$VAR == ''` or non-empty
|
||||||
|
@ -514,7 +514,7 @@ Below you can find supported syntax reference:
|
||||||
|
|
||||||
> Example: `$VARIABLE_1 == $VARIABLE_2`
|
> Example: `$VARIABLE_1 == $VARIABLE_2`
|
||||||
|
|
||||||
> Example: `$VARIABLE_1 != $VARIABLE_2` _(added in 11.11)_
|
> Example: `$VARIABLE_1 != $VARIABLE_2` (introduced in GitLab 11.11)
|
||||||
|
|
||||||
It is possible to compare two variables. This is going to compare values
|
It is possible to compare two variables. This is going to compare values
|
||||||
of these variables.
|
of these variables.
|
||||||
|
@ -530,11 +530,11 @@ Below you can find supported syntax reference:
|
||||||
`$STAGING` value needs to a string, with length higher than zero.
|
`$STAGING` value needs to a string, with length higher than zero.
|
||||||
Variable that contains only whitespace characters is not an empty variable.
|
Variable that contains only whitespace characters is not an empty variable.
|
||||||
|
|
||||||
1. Pattern matching _(added in 11.0)_
|
1. Pattern matching (introduced in GitLab 11.0)
|
||||||
|
|
||||||
> Example: `$VARIABLE =~ /^content.*/`
|
> Example: `$VARIABLE =~ /^content.*/`
|
||||||
|
|
||||||
> Example: `$VARIABLE_1 !~ /^content.*/` _(added in 11.11)_
|
> Example: `$VARIABLE_1 !~ /^content.*/` (introduced in GitLab 11.11)
|
||||||
|
|
||||||
It is possible perform pattern matching against a variable and regular
|
It is possible perform pattern matching against a variable and regular
|
||||||
expression. Expression like this evaluates to truth if matches are found
|
expression. Expression like this evaluates to truth if matches are found
|
||||||
|
@ -543,7 +543,7 @@ Below you can find supported syntax reference:
|
||||||
Pattern matching is case-sensitive by default. Use `i` flag modifier, like
|
Pattern matching is case-sensitive by default. Use `i` flag modifier, like
|
||||||
`/pattern/i` to make a pattern case-insensitive.
|
`/pattern/i` to make a pattern case-insensitive.
|
||||||
|
|
||||||
1. Conjunction / Disjunction
|
1. Conjunction / Disjunction ([introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27925) in GitLab 12.0)
|
||||||
|
|
||||||
> Example: `$VARIABLE1 =~ /^content.*/ && $VARIABLE2 == "something"`
|
> Example: `$VARIABLE1 =~ /^content.*/ && $VARIABLE2 == "something"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue