Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/ci
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-05-22 08:32:40 +0300
committerShinya Maeda <shinya@gitlab.com>2018-05-22 08:32:40 +0300
commitf61666c0d70ed2d8457e4a8d8d23e68816498035 (patch)
tree67478ee365f1c1f652ed3f3e5e8c69eefe7a48ee /doc/ci
parent1c636b8080bad4f9ea8fb6992277e421816271ce (diff)
parentc6f72ac9a88521257991aa9a0cc6d558126f5bb9 (diff)
Merge branch 'master' into per-project-pipeline-iid
Diffstat (limited to 'doc/ci')
-rw-r--r--doc/ci/environments.md1
-rw-r--r--doc/ci/variables/README.md11
-rw-r--r--doc/ci/yaml/README.md13
3 files changed, 24 insertions, 1 deletions
diff --git a/doc/ci/environments.md b/doc/ci/environments.md
index 517e25f00f7..3a491f0073c 100644
--- a/doc/ci/environments.md
+++ b/doc/ci/environments.md
@@ -252,6 +252,7 @@ including predefined, secure variables and `.gitlab-ci.yml`
[`variables`](yaml/README.md#variables). You however cannot use variables
defined under `script` or on the Runner's side. There are other variables that
are unsupported in environment name context:
+- `CI_PIPELINE_ID`
- `CI_JOB_ID`
- `CI_JOB_TOKEN`
- `CI_BUILD_ID`
diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md
index 4a83d4fbe33..bf32f6567a5 100644
--- a/doc/ci/variables/README.md
+++ b/doc/ci/variables/README.md
@@ -531,6 +531,16 @@ Below you can find supported syntax reference:
`$STAGING` value needs to a string, with length higher than zero.
Variable that contains only whitespace characters is not an empty variable.
+1. Pattern matching _(added in 11.0)_
+
+ > Example: `$VARIABLE =~ /^content.*/`
+
+ It is possible perform pattern matching against a variable and regular
+ expression. Expression like this evaluates to truth if matches are found.
+
+ Pattern matching is case-sensitive by default. Use `i` flag modifier, like
+ `/pattern/i` to make a pattern case-insensitive.
+
### Unsupported predefined variables
Because GitLab evaluates variables before creating jobs, we do not support a
@@ -544,6 +554,7 @@ We do not support variables containing tokens because of security reasons.
You can find a full list of unsupported variables below:
+- `CI_PIPELINE_ID`
- `CI_JOB_ID`
- `CI_JOB_TOKEN`
- `CI_BUILD_ID`
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 2a17a51d7f8..3e77a6f58b7 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -344,10 +344,11 @@ job:
kubernetes: active
```
-Example of using variables expressions:
+Examples of using variables expressions:
```yaml
deploy:
+ script: cap staging deploy
only:
refs:
- branches
@@ -356,6 +357,16 @@ deploy:
- $STAGING
```
+Another use case is exluding jobs depending on a commit message _(added in 11.0)_:
+
+```yaml
+end-to-end:
+ script: rake test:end-to-end
+ except:
+ variables:
+ - $CI_COMMIT_MESSAGE =~ /skip-end-to-end-tests/
+```
+
Learn more about variables expressions on [a separate page][variables-expressions].
## `tags`