diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-12-01 12:39:13 +0100 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-01-04 16:56:24 +0100 |
commit | 72f2e88dd68df9d95d37079c314cd7c0cd924340 (patch) | |
tree | 3c862785402cbd9e7bef2021b2d3bb5183bda95c /doc | |
parent | b97b85c37e77e5d37705cb2d3a60161896585420 (diff) | |
download | gitlab-ce-include-project.tar.gz |
Allow to include files from another projectsinclude-project
This adds `project:, file:, ref:` specification support.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ci/yaml/README.md | 31 |
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: |