@@ -482,11 +482,16 @@ value you set for this specific pipeline:
...
@@ -482,11 +482,16 @@ value you set for this specific pipeline:
## Environment variables expressions
## Environment variables expressions
> Introduced in GitLab 10.7.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/37397) in GitLab 10.7 for [the `only` and `except` CI keywords](../yaml/README.md#onlyexcept-advanced)
> - [Expanded](https://gitlab.com/gitlab-org/gitlab/issues/27863) in GitLab 12.3 with [the `rules` keyword](../yaml/README.md#rules)
It is possible to use variables expressions with only / except policies in
Variable expressions can be used to limit what jobs are going to be created
`.gitlab-ci.yml`. By using this approach you can limit what jobs are going to
within a pipeline after pushing changes to GitLab.
be created within a pipeline after pushing a code to GitLab.
In `.gitlab-ci.yml`, they work with both
-[`rules`](../yaml/README.md#rules), which is the recommended approach, and
-[`only` and `except`](../yaml/README.md#onlyexcept-basic), which are candidates for deprecation.
This is particularly useful in combination with variables and triggered
This is particularly useful in combination with variables and triggered
pipeline variables.
pipeline variables.
...
@@ -573,8 +578,8 @@ Below you can find supported syntax reference:
...
@@ -573,8 +578,8 @@ Below you can find supported syntax reference:
Examples:
Examples:
-`$VARIABLE =~ /^content.*/`
-`=~`: True if pattern is matched. Ex: `$VARIABLE =~ /^content.*/`
-`$VARIABLE_1 !~ /^content.*/` (introduced in GitLab 11.11)
-`!~`: True if pattern is not matched. Ex: `$VARIABLE_1 !~ /^content.*/` ([Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/61900) in GitLab 11.11)
Variable pattern matching with regular expressions uses the
Variable pattern matching with regular expressions uses the