Commit 195329e2 authored by Suzanne Selhorn's avatar Suzanne Selhorn

Merge branch 'docs-variables-examples-crosslink' into 'master'

Add crosslink to variables examples

See merge request gitlab-org/gitlab!33675
parents 75d78d72 75831bf9
...@@ -146,7 +146,7 @@ test: ...@@ -146,7 +146,7 @@ test:
Instead, you can use the Instead, you can use the
[`$CI_COMMIT_REF_NAME` predefined environment [`$CI_COMMIT_REF_NAME` predefined environment
variable](../variables/predefined_variables.md#variables-reference) in variable](../variables/predefined_variables.md) in
combination with combination with
[`only:variables`](../yaml/README.md#onlyvariablesexceptvariables) to [`only:variables`](../yaml/README.md#onlyvariablesexceptvariables) to
accomplish this behavior: accomplish this behavior:
......
...@@ -23,7 +23,7 @@ The following methods of authentication are supported: ...@@ -23,7 +23,7 @@ The following methods of authentication are supported:
- [Trigger token](#trigger-token) - [Trigger token](#trigger-token)
- [CI job token](#ci-job-token) - [CI job token](#ci-job-token)
If using the `$CI_PIPELINE_SOURCE` [predefined environment variable](../variables/predefined_variables.md#variables-reference) If using the `$CI_PIPELINE_SOURCE` [predefined environment variable](../variables/predefined_variables.md)
to limit which jobs run in a pipeline, the value could be either `pipeline` or `trigger`, to limit which jobs run in a pipeline, the value could be either `pipeline` or `trigger`,
depending on which trigger method is used. depending on which trigger method is used.
......
...@@ -10,8 +10,6 @@ type: reference ...@@ -10,8 +10,6 @@ type: reference
For an introduction on this subject, read through the For an introduction on this subject, read through the
[getting started with environment variables](README.md) document. [getting started with environment variables](README.md) document.
## Overview
Some of the predefined environment variables are available only if a minimum Some of the predefined environment variables are available only if a minimum
version of [GitLab Runner](https://docs.gitlab.com/runner/) is used. Consult the table below to find the version of [GitLab Runner](https://docs.gitlab.com/runner/) is used. Consult the table below to find the
version of Runner required. version of Runner required.
...@@ -22,7 +20,8 @@ Starting with GitLab 9.0, we have deprecated some variables. Read the ...@@ -22,7 +20,8 @@ Starting with GitLab 9.0, we have deprecated some variables. Read the
strongly advised to use the new variables as we will remove the old ones in strongly advised to use the new variables as we will remove the old ones in
future GitLab releases.** future GitLab releases.**
## Variables reference You can add a command to your `.gitlab-ci.yml` file to
[output the values of all variables available for a job](README.md#list-all-environment-variables).
| Variable | GitLab | Runner | Description | | Variable | GitLab | Runner | Description |
|-----------------------------------------------|--------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |-----------------------------------------------|--------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
......
...@@ -1428,7 +1428,7 @@ This means the `only:changes` policy is useful for pipelines where: ...@@ -1428,7 +1428,7 @@ This means the `only:changes` policy is useful for pipelines where:
- `$CI_PIPELINE_SOURCE == 'external_pull_request_event'` - `$CI_PIPELINE_SOURCE == 'external_pull_request_event'`
If there is no Git push event, such as for pipelines with If there is no Git push event, such as for pipelines with
[sources other than the three above](../variables/predefined_variables.md#variables-reference), [sources other than the three above](../variables/predefined_variables.md),
`changes` can't determine if a given file is new or old, and will always `changes` can't determine if a given file is new or old, and will always
return true. return true.
......
...@@ -91,7 +91,7 @@ disable running the custom scanner. ...@@ -91,7 +91,7 @@ disable running the custom scanner.
GitLab also defines a `CI_PROJECT_REPOSITORY_LANGUAGES` variable, which provides the list of GitLab also defines a `CI_PROJECT_REPOSITORY_LANGUAGES` variable, which provides the list of
languages in the repository. Depending on this value, your scanner may or may not do something different. languages in the repository. Depending on this value, your scanner may or may not do something different.
Language detection currently relies on the [`linguist`](https://github.com/github/linguist) Ruby gem. Language detection currently relies on the [`linguist`](https://github.com/github/linguist) Ruby gem.
See [GitLab CI/CD predefined variables](../../ci/variables/predefined_variables.md#variables-reference). See [GitLab CI/CD predefined variables](../../ci/variables/predefined_variables.md).
#### Policy checking example #### Policy checking example
......
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