Commit e08d549f authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'docs-spt-180408' into 'master'

Change interruptible statement to point to reference

See merge request gitlab-org/gitlab!49062
parents 77f76329 a3b4ff27
......@@ -209,7 +209,8 @@ You can set pending or running pipelines to cancel automatically when a new pipe
1. Check the **Auto-cancel redundant, pending pipelines** checkbox.
1. Click **Save changes**.
Note that only jobs with [interruptible](../yaml/README.md#interruptible) set to `true` are cancelled.
Use the [`interruptible`](../yaml/README.md#interruptible) keyword to indicate if a
running job can be cancelled before it completes.
## Skip outdated deployment jobs
......
......@@ -3655,19 +3655,19 @@ The trigger token is different than the [`trigger`](#trigger) keyword.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32022) in GitLab 12.3.
`interruptible` is used to indicate that a job should be canceled if made redundant by a newer pipeline run. Defaults to `false`.
`interruptible` is used to indicate that a running job should be canceled if made redundant by a newer pipeline run.
Defaults to `false` (uninterruptible). Jobs that have not started yet (pending) are considered interruptible
and safe to be cancelled.
This value is used only if the [automatic cancellation of redundant pipelines feature](../pipelines/settings.md#auto-cancel-pending-pipelines)
is enabled.
When enabled, a pipeline on the same branch is canceled when:
When enabled, a pipeline is immediately canceled when a new pipeline starts on the same branch if either of the following is true:
- It's made redundant by a newer pipeline run.
- Either all jobs are set as interruptible, or any uninterruptible jobs haven't started.
- All jobs in the pipeline are set as interruptible.
- Any uninterruptible jobs have not started yet.
Set jobs as interruptible that can be safely canceled once started (for instance, a build job).
Pending jobs are always considered interruptible.
For example:
```yaml
......@@ -3699,7 +3699,7 @@ In the example above, a new pipeline run causes an existing running pipeline to
- Canceled, if only `step-1` is running or pending.
- Not canceled, once `step-2` starts running.
When an uninterruptible job is running, the pipeline can never be canceled, regardless of the final job's state.
When an uninterruptible job is running, the pipeline cannot be canceled, regardless of the final job's state.
### `resource_group`
......
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