Commit 43f432c2 authored by Mayra Cabrera's avatar Mayra Cabrera Committed by Kamil Trzciński

Document edge cases for gitlab-ci.yml `include` keyword

parent 61bdccf4
...@@ -367,7 +367,7 @@ skip the download step. ...@@ -367,7 +367,7 @@ skip the download step.
Using the `include` keyword, you can allow the inclusion of external YAML files. Using the `include` keyword, you can allow the inclusion of external YAML files.
In the following example, the content of`.before-script-template.yml` will be In the following example, the content of `.before-script-template.yml` will be
automatically fetched and evaluated along with the content of `.gitlab-ci.yml`: automatically fetched and evaluated along with the content of `.gitlab-ci.yml`:
```yaml ```yaml
...@@ -424,6 +424,9 @@ include: ...@@ -424,6 +424,9 @@ include:
your configuration file is. In other words, when using a **local file**, make your configuration file is. In other words, when using a **local file**, make
sure that both `.gitlab-ci.yml` and the local file are on the same branch. sure that both `.gitlab-ci.yml` and the local file are on the same branch.
NOTE: **Note:**
We don't support the inclusion of local files through Git submodules paths.
- **remote** in a different location, accessed using HTTP/HTTPS, referenced - **remote** in a different location, accessed using HTTP/HTTPS, referenced
using the full URL. For example: using the full URL. For example:
...@@ -431,6 +434,9 @@ include: ...@@ -431,6 +434,9 @@ include:
include: 'https://gitlab.com/awesome-project/raw/master/.gitlab-ci-template.yml' include: 'https://gitlab.com/awesome-project/raw/master/.gitlab-ci-template.yml'
``` ```
NOTE: **Note:**
The remote file must be publicly accessible through a simple GET request, as we don't support authentication schemas in the remote URL.
--- ---
Since external files defined by `include` are evaluated first, the content of Since external files defined by `include` are evaluated first, the content of
...@@ -492,6 +498,9 @@ In this case, the variables `POSTGRES_USER`, `POSTGRES_PASSWORD` and ...@@ -492,6 +498,9 @@ In this case, the variables `POSTGRES_USER`, `POSTGRES_PASSWORD` and
`autodevops-template.yml` will be overridden by the ones defined in `autodevops-template.yml` will be overridden by the ones defined in
`.gitlab-ci.yml`. `.gitlab-ci.yml`.
NOTE: **Note:**
Momentarily the [CI Lint](https://gitlab.com/ci/lint) does not support the `include` keyword.
## Jobs ## Jobs
`.gitlab-ci.yml` allows you to specify an unlimited number of jobs. Each job `.gitlab-ci.yml` allows you to specify an unlimited number of jobs. Each job
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment