Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5516a768
Commit
5516a768
authored
Feb 29, 2020
by
Marcel Amirault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs regarding regex in ci rules
parent
b7c5b24e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
doc/ci/variables/README.md
doc/ci/variables/README.md
+6
-3
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+4
-1
No files found.
doc/ci/variables/README.md
View file @
5516a768
...
...
@@ -571,9 +571,12 @@ Below you can find supported syntax reference:
-
`$VARIABLE =~ /^content.*/`
-
`$VARIABLE_1 !~ /^content.*/`
(introduced in GitLab 11.11)
It is possible perform pattern matching against a variable and regular
expression. Expression like this evaluates to truth if matches are found
when using
`=~`
. It evaluates to truth if matches are not found when
`!~`
is used.
Variable pattern matching with regular expressions uses the
[
RE2 regular expression syntax
](
https://github.com/google/re2/wiki/Syntax
)
.
Expressions evaluate as
`true`
if:
-
Matches are found when using
`=~`
.
-
Matches are
*not*
found when using
`!~`
.
Pattern matching is case-sensitive by default. Use
`i`
flag modifier, like
`/pattern/i`
to make a pattern case-insensitive.
...
...
doc/ci/yaml/README.md
View file @
5516a768
...
...
@@ -857,7 +857,10 @@ In this example, if the first rule:
`rules:if`
differs slightly from
`only:variables`
by accepting only a single
expression string, rather than an array of them. Any set of expressions to be
evaluated should be conjoined into a single expression using
`&&`
or
`||`
. For example:
evaluated should be conjoined into a single expression using
`&&`
or
`||`
, and use
the
[
variable matching syntax
](
../variables/README.md#supported-syntax
)
.
For example:
```
yaml
job
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment