You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* start skip process section
* add section detailing what happens when you skip a commit
* clarify some language
* minor change
* update title
* update title in sidebar
Copy file name to clipboardExpand all lines: jekyll/_cci2/skip-build.adoc
+41-21Lines changed: 41 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,55 @@
1
1
---
2
-
layout: classic-docs
3
-
title: Skip or cancel jobs and workflows
4
-
description: This document describes the options available to you for controlling when work is automatically carried out on your project, by skipping jobs or auto-cancelling workflows.
5
2
contentTags:
6
3
platform:
7
4
- Cloud
8
5
- Server v4.x
9
6
- Server v3.x
10
7
---
8
+
= Skip CI and cancel workflows
9
+
:page-layout: classic-docs
10
+
:page-liquid:
11
+
:page-description: This document describes the options available to you for controlling when work is automatically carried out on your project, by skipping jobs or auto-cancelling workflows.
12
+
:icons: font
13
+
:experimental:
11
14
12
-
This document describes how to skip or cancel work when triggering pipelines. There are a couple of ways to do this. The jobs within a pipeline can be skipped on commit, or workflows can be cancelled using the auto-cancel feature. Both methods are described below.
15
+
This page describes how to skip or cancel work when triggering pipelines. There are a couple of ways to do this:
13
16
14
-
## Skip jobs
15
-
{: #skip-jobs }
17
+
* The CI processes can be skipped for a commit, on push to your repo.
18
+
* Workflows can be cancelled using the auto-cancel feature.
16
19
17
-
By default, CircleCI automatically triggers a pipeline whenever you push changes to your project. You can override this behavior by adding a `[ci skip]` or `[skip ci]` tag within the first 250 characters of the body or title of the **latest commit** you pushed. This will skip the pipeline execution for all the commits included in the push.
20
+
Both methods are described below.
18
21
19
-
### Scope
20
-
{: #scope }
22
+
[#skip-jobs]
23
+
== Skip CI for a specific push
24
+
25
+
By default, CircleCI automatically triggers a pipeline whenever you push changes to your project. You can override this behavior by adding one of the following tags within the first 250 characters of the body or title of the **latest commit** you pushed:
26
+
27
+
* `[ci skip]`
28
+
* `[skip ci]`
29
+
30
+
Adding one of these tags skips pipeline execution for all the commits included in the push.
31
+
32
+
=== The skip CI process
33
+
34
+
When you include `[ci skip]` or `[skip ci]` in the first 250 characters of the body or title of a commit, CircleCI uses this infomation to decide not to build your project.
35
+
36
+
The skip process is different depending on your VCS integration, as follows:
37
+
38
+
* xref:github-apps-integration#[GitHub App]: A skipped pipeline will not show on the pipelines page, and no pipeline will be returned for a skipped commit using the API.
39
+
40
+
* GitHub OAuth, GitLab, Bitbucket: A skipped pipeline will show in the CircleCI web app pipelines page with a status of NOT RUN. A pipeline will be returned for the skipped commit using the API with a status of `created` but the workflows and jobs will be `not run`.
41
+
42
+
NOTE: **GitLab known issue**: If you skip a commit using GitLab a pipeline will appear to be running indefinitely in the GitLab UI but the pipeline is not triggered in CircleCI.
43
+
44
+
=== Scope
21
45
22
46
A few points to note regarding the scope of the `ci skip` feature:
23
47
24
48
* The pipeline and workflows will still exist for these commits but no jobs will be run.
25
49
* If you push multiple commits at once, and the latest commit includes a `[ci skip]` or `[skip ci]` tag, it will skip the pipeline execution for all commits in that push.
26
50
* This feature is not supported for fork PRs. Scheduled workflows will run even if you push a commit with `[ci skip]` message. Changing the config file is the way to upgrade the current schedule.
When pushed to a VCS, this commit will not be built on CircleCI because of the `[ci skip]` or `[skip ci]` in the commit description.
62
84
63
-
## Auto-cancel redundant workflows
64
-
{: #auto-cancel}
85
+
[#auto-cancel]
86
+
== Auto-cancel redundant workflows
65
87
66
88
If you are frequently pushing changes to a branch, you increase the chances of queueing. This means you might have to wait for an older pipeline to complete before the most recent version starts.
67
89
68
90
To save time, you can configure CircleCI to automatically cancel any non-terminated workflows when a newer pipeline is triggered on that same branch.
69
91
70
-
### Scope
71
-
{: #scope }
92
+
=== Scope
72
93
73
94
A few points to note regarding the use of the auto-cancel feature:
74
95
@@ -77,16 +98,15 @@ A few points to note regarding the use of the auto-cancel feature:
77
98
* Only workflows that are triggered when the feature is enabled will be auto-cancelled.
78
99
79
100
### Enable auto-cancel
80
-
{: #enable-auto-cancel }
81
101
82
102
It is important to carefully consider the impact of enabling the auto-cancel feature, for example, if you have configured automated deployment jobs on non-default branches.
83
103
{: class="alert alert-warning"}
84
104
85
-
1. In the CircleCI application, go to your **Project Settings**.
105
+
. In the CircleCI application, go to your **Project Settings**.
86
106
87
-
2. Click on**Advanced Settings**.
107
+
. Select **Advanced Settings**.
88
108
89
-
3. Toggle the switch to enable the **Auto-cancel redundant workflows** option.
109
+
. Toggle the switch to enable the **Auto-cancel redundant workflows** option.
90
110
91
111
Projects which have auto-cancel enabled will have pipelines and workflows on non-default branches cancelled when a newer build is triggered on that same branch, with the following exceptions:
0 commit comments