Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1b477f33
Commit
1b477f33
authored
Sep 15, 2021
by
Marcel Amirault
Committed by
Suzanne Selhorn
Sep 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update style of interruptible keyword
parent
5a60628d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
doc/ci/yaml/index.md
doc/ci/yaml/index.md
+20
-14
No files found.
doc/ci/yaml/index.md
View file @
1b477f33
...
...
@@ -3774,25 +3774,19 @@ The trigger token is different than the [`trigger`](#trigger) keyword.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32022) in GitLab 12.3.
Use
`interruptible`
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-redundant-pipelines
)
is enabled.
Use
`interruptible`
if a job should be canceled when a newer pipeline starts before the job completes.
When enabled, a pipeline is immediately canceled when a new pipeline starts on the same branch if either of the following is true:
This keyword is used with the
[
automatic cancellation of redundant pipelines
](
../pipelines/settings.md#auto-cancel-redundant-pipelines
)
feature. When enabled, a running job with
`interruptible: true`
can be cancelled when
a new pipeline starts on the same branch.
-
All jobs in the pipeline are set as interruptible.
-
Any uninterruptible jobs have not started yet.
You can't cancel subsequent jobs after a job with
`interruptible: false`
starts.
Set jobs as interruptible that can be safely canceled once started (for instance, a build job).
In the following example, a new pipeline run causes an existing running pipeline to be:
**Keyword type**
: Job keyword. You can use it only as part of a job.
-
Canceled, if only
`step-1`
is running or pending.
-
Not canceled, once
`step-2`
starts running.
**Possible inputs**
:
`true`
or
`false`
(default).
After an uninterruptible job starts running, the pipeline cannot be canceled.
**Example of `interruptible`**
:
```
yaml
stages
:
...
...
@@ -3818,6 +3812,18 @@ step-3:
interruptible
:
true
```
In this example, a new pipeline causes a running pipeline to be:
-
Canceled, if only
`step-1`
is running or pending.
-
Not canceled, after
`step-2`
starts.
**Additional details**
:
-
Only set
`interruptible: true`
if the job can be safely canceled after it has started,
like a build job. Deployment jobs usually shouldn't be cancelled, to prevent partial deployments.
-
To completely cancel a running pipeline, all jobs must have
`interruptible: true`
,
or
`interruptible: false`
jobs must not have started.
### `resource_group`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/15536) in GitLab 12.7.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment