Skip to content

Commit cb3320f

Browse files
authored
Merge pull request circleci#1029 from circleci/keybits-patch-1
Clarify that we look for skip in title and description
2 parents b79a5c6 + 8760257 commit cb3320f

File tree

1 file changed

+57
-6
lines changed

1 file changed

+57
-6
lines changed

jekyll/_cci1/skip-a-build.md

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,50 @@ description: How to skip a build
77

88
CircleCI supports the `[ci skip]` or `[skip ci]` standard for ignoring builds.
99

10-
CircleCI won't run the build if we find `[ci skip]` or `[skip ci]` anywhere in the commit message of the head commit.
11-
You can use the handy retry button on the build page if you decide that you want to run the build after all.
10+
When code changes are pushed to your VCS provider (GitHub or Bitbucket), if the last commit has `[ci skip]` or `[skip ci]` anywhere in the commit message title or description, then none of the commits in that push will be built automatically by CircleCI.
1211

13-
## Example
12+
**Note:** the 'title' of a Git commit is the first line. The 'description' (sometimes called 'comment' or 'body') is separated from the 'title' by a blank line and can contain several lines of text. Be aware that previous commit titles may be added to the description automatically (e.g. during a rebase) and if they contain `[ci skip]` then the build will be skipped even though you didn't specify it explicitly in the 'title'.
1413

15-
If Daniel pushes his last two commits now, CircleCI won't run tests for that push:
14+
Currently neither `[ci skip]` nor `[skip ci]` supports fork PRs.
15+
16+
If you decide you want to build a skipped commit, you can click the 'Rebuild' button on the build details page in CircleCI to override the `[ci skip]` or `[skip ci]` tag.
17+
18+
## Examples
19+
20+
### 1. `[ci skip]` in commit title
21+
22+
```
23+
$ git log origin/master..HEAD
24+
25+
commit 63ce74221ff899955dd6258020d6cb9accede893
26+
Author: Daniel Woelfel <[email protected]>
27+
Date: Wed Jan 23 16:48:25 2017 -0800
28+
29+
fix misspelling [ci skip]
30+
```
31+
32+
When pushed to your VCS provider, this commit will not be built on CircleCI.
33+
34+
### 2. `[ci skip]` in commit description
35+
36+
```
37+
$ git log origin/master..HEAD
38+
39+
commit 99b4ce4d59e79cb379987b39c65f7113631f0635
40+
Merge: 16ba8ca adc6571
41+
Author: Daniel Woelfel <[email protected]>
42+
Date: Tue Apr 25 15:56:42 2016 -0800
43+
44+
A quite big new feature
45+
46+
Fix bug in feature
47+
Refactor feature code
48+
First attempt at feature [ci skip]
49+
```
50+
51+
The last three lines are the commit description. This could be descriptive text, or, as in this example, from squashed commit titles after a rebase. Since one of these contains `[ci skip]` the build will be skipped.
52+
53+
### 3. Two commits skipped because `[ci skip]` present in last commit when pushed
1654

1755
```
1856
$ git log origin/master..HEAD
@@ -27,7 +65,20 @@ commit 463147193b2fe561cfb12a9787434dd726390fcd
2765
Author: Daniel Woelfel <[email protected]>
2866
Date: Wed Jan 23 16:30:24 2013 -0800
2967
30-
add "Skip a build" doc
68+
add documentation
3169
```
3270

33-
Note that if the commits were in the opposite order, then the push would have been built. Currently neither `[ci skip]` nor `[skip ci]` supports fork PRs.
71+
In this example both commits are skipped because they were pushed together.
72+
73+
### 4. Skip a Git tag release
74+
75+
```
76+
$ git log origin/master..HEAD
77+
78+
master:
79+
Release v2.6.1 [ci skip]
80+
Presentation data cleanup (#41)
81+
Enable translation update for presentation also
82+
```
83+
84+
You can skip building Git tags by including `[ci skip]` in the tag description.

0 commit comments

Comments
 (0)