@@ -126,7 +126,7 @@ The following table lists available parameters for jobs:
...
@@ -126,7 +126,7 @@ The following table lists available parameters for jobs:
| [`rules`](#rules) | List of conditions to evaluate and determine selected attributes of a job, and whether or not it's created. May not be used alongside `only`/`except`. |
| [`rules`](#rules) | List of conditions to evaluate and determine selected attributes of a job, and whether or not it's created. May not be used alongside `only`/`except`. |
| [`services`](#services) | Use Docker services images. Also available: `services:name`, `services:alias`, `services:entrypoint`, and `services:command`. |
| [`services`](#services) | Use Docker services images. Also available: `services:name`, `services:alias`, `services:entrypoint`, and `services:command`. |
| [`stage`](#stage) | Defines a job stage (default: `test`). |
| [`stage`](#stage) | Defines a job stage (default: `test`). |
| [`tags`](#tags) | List of tags which are used to select a runner. |
| [`tags`](#tags) | List of tags that are used to select a runner. |
| [`timeout`](#timeout) | Define a custom job-level timeout that takes precedence over the project-wide setting. |
| [`timeout`](#timeout) | Define a custom job-level timeout that takes precedence over the project-wide setting. |
| [`trigger`](#trigger) | Defines a downstream pipeline trigger. |
| [`trigger`](#trigger) | Defines a downstream pipeline trigger. |
| [`variables`](#variables) | Define job variables on a job level. |
| [`variables`](#variables) | Define job variables on a job level. |
...
@@ -408,7 +408,7 @@ otherwise the external file is not included.
...
@@ -408,7 +408,7 @@ otherwise the external file is not included.
| [`local`](#includelocal) | Include a file from the local project repository. |
| [`local`](#includelocal) | Include a file from the local project repository. |
| [`file`](#includefile) | Include a file from a different project repository. |
| [`file`](#includefile) | Include a file from a different project repository. |
| [`remote`](#includeremote) | Include a file from a remote URL. Must be publicly accessible. |
| [`remote`](#includeremote) | Include a file from a remote URL. Must be publicly accessible. |
| [`template`](#includetemplate) | Include templates which are provided by GitLab. |
| [`template`](#includetemplate) | Include templates that are provided by GitLab. |
The `include` methods do not support [variable expansion](../variables/where_variables_can_be_used.md#variables-usage).
The `include` methods do not support [variable expansion](../variables/where_variables_can_be_used.md#variables-usage).
...
@@ -455,7 +455,7 @@ include:
...
@@ -455,7 +455,7 @@ include:
```
```
TIP: **Tip:**
TIP: **Tip:**
Local includes can be used as a replacement for symbolic links which are not followed.
Local includes can be used as a replacement for symbolic links that are not followed.
This can be defined as a short local include:
This can be defined as a short local include:
...
@@ -616,7 +616,7 @@ For more information, see [Available settings for `services`](../docker/using_do
...
@@ -616,7 +616,7 @@ For more information, see [Available settings for `services`](../docker/using_do
### `script`
### `script`
`script` is the only required keyword that a job needs. It's a shell script
`script` is the only required keyword that a job needs. It's a shell script
which is executed by the runner. For example:
that is executed by the runner. For example:
```yaml
```yaml
job:
job:
...
@@ -837,7 +837,7 @@ See [custom collapsible sections](../pipelines/index.md#custom-collapsible-secti
...
@@ -837,7 +837,7 @@ See [custom collapsible sections](../pipelines/index.md#custom-collapsible-secti
### `stage`
### `stage`
`stage` is defined per-job and relies on [`stages`](#stages) which is defined
`stage` is defined per-job and relies on [`stages`](#stages), which is defined
globally. It allows to group jobs into different stages, and jobs of the same
globally. It allows to group jobs into different stages, and jobs of the same
`stage` are executed in parallel (subject to [certain conditions](#using-your-own-runners)). For example:
`stage` are executed in parallel (subject to [certain conditions](#using-your-own-runners)). For example:
...
@@ -1558,9 +1558,9 @@ the most out of your pipelines.
...
@@ -1558,9 +1558,9 @@ the most out of your pipelines.
`only` and `except` are two parameters that set a job policy to limit when
`only` and `except` are two parameters that set a job policy to limit when
jobs are created:
jobs are created:
1.`only` defines the names of branches and tags for which the job will run.
1.`only` defines the names of branches and tags the job runs for.
1.`except` defines the names of branches and tags for which the job will
1.`except` defines the names of branches and tags the job does
**not** run.
**not** run for.
There are a few rules that apply to the usage of job policy:
There are a few rules that apply to the usage of job policy:
...
@@ -1968,8 +1968,8 @@ properly corrected any failures from previous pipelines.
...
@@ -1968,8 +1968,8 @@ properly corrected any failures from previous pipelines.
Without [pipelines for merge requests](../merge_request_pipelines/index.md), pipelines
Without [pipelines for merge requests](../merge_request_pipelines/index.md), pipelines
run on branches or tags that don't have an explicit association with a merge request.
run on branches or tags that don't have an explicit association with a merge request.
In this case, a previous SHA is used to calculate the diff, which equivalent to `git diff HEAD~`.
In this case, a previous SHA is used to calculate the diff, which is equivalent to `git diff HEAD~`.
This could result in some unexpected behavior, including:
This can result in some unexpected behavior, including:
- When pushing a new branch or a new tag to GitLab, the policy always evaluates to true.
- When pushing a new branch or a new tag to GitLab, the policy always evaluates to true.
- When pushing a new commit, the changed files are calculated using the previous commit
- When pushing a new commit, the changed files are calculated using the previous commit
...
@@ -2521,11 +2521,10 @@ deploy to production:
...
@@ -2521,11 +2521,10 @@ deploy to production:
> including predefined, secure variables and `.gitlab-ci.yml` [`variables`](#variables).
> including predefined, secure variables and `.gitlab-ci.yml` [`variables`](#variables).
> You however can't use variables defined under `script`.
> You however can't use variables defined under `script`.
This is an optional value that when set, it exposes buttons in various places
This optional value exposes buttons that take you to the defined URL
in GitLab which when clicked take you to the defined URL.
In the example below, if the job finishes successfully, it will create buttons
In this example, if the job finishes successfully, it creates buttons
in the merge requests and in the environments/deployments pages which will point
in the merge requests and in the environments/deployments pages that point
to `https://prod.example.com`.
to `https://prod.example.com`.
```yaml
```yaml
...
@@ -2694,7 +2693,7 @@ for inclusion in URLs. In this case, if the `deploy as review app` job was run
...
@@ -2694,7 +2693,7 @@ for inclusion in URLs. In this case, if the `deploy as review app` job was run
in a branch named `pow`, this environment would be accessible with an URL like
in a branch named `pow`, this environment would be accessible with an URL like
`https://review-pow.example.com/`.
`https://review-pow.example.com/`.
This of course implies that the underlying server which hosts the application
This implies that the underlying server that hosts the application
is properly configured.
is properly configured.
The common use case is to create dynamic environments for branches and use them
The common use case is to create dynamic environments for branches and use them
...
@@ -2713,7 +2712,7 @@ TIP: **Learn more:**
...
@@ -2713,7 +2712,7 @@ TIP: **Learn more:**
Read how caching works and find out some good practices in the
Read how caching works and find out some good practices in the