summaryrefslogtreecommitdiff
path: root/doc/ci
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci')
-rw-r--r--doc/ci/yaml/README.md31
1 files changed, 30 insertions, 1 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index fdb57532770..01d6eef5525 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -1724,7 +1724,7 @@ include:
---
-`include` supports three types of files:
+`include` supports four types of files:
- **local** to the same repository, referenced by using full paths in the same
repository, with `/` being the root directory. For example:
@@ -1750,6 +1750,35 @@ include:
NOTE: **Note:**
We don't support the inclusion of local files through Git submodules paths.
+- **file** from another repository, referenced by using full paths in the same
+ repository, with `/` being the root directory. For example:
+
+ ```yaml
+ include:
+ project: `my-group/my-project`
+ file: '/templates/.gitlab-ci-template.yml'
+ ```
+
+ You can also specify `ref:`. The default `ref:` being used is the `HEAD` of the project:
+
+ ```yaml
+ include:
+ - project: `my-group/my-project`
+ ref: master
+ file: '/templates/.gitlab-ci-template.yml'
+
+ - project: `my-group/my-project`
+ ref: v1.0.0
+ file: '/templates/.gitlab-ci-template.yml'
+
+ - project: `my-group/my-project`
+ ref: 787123b47f14b552955ca2786bc9542ae66fee5b # git sha
+ file: '/templates/.gitlab-ci-template.yml'
+ ```
+
+ NOTE: **Note:**
+ Feature is supported since 11.7.
+
- **remote** in a different location, accessed using HTTP/HTTPS, referenced
using the full URL. For example: