Commit 54235a6 1 parent 0c3efcc commit 54235a6 Copy full SHA for 54235a6
File tree 3 files changed +31
-1
lines changed
3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1
1
version : 2.1
2
2
jobs :
3
+ check-linear :
4
+ machine :
5
+ image : ubuntu-1604:201903-01
6
+ steps :
7
+ - checkout
8
+ - run :
9
+ name : Check git history of branch is linear
10
+ command : tools/check-linear.sh
3
11
build :
4
12
machine :
5
13
image : ubuntu-1604:201903-01
34
42
command : echo "bazel build //upload --verbose_failures" | HOMEWORLD_CHROOT="$HOME/autobuild-chroot" USER="circleci" ./build-chroot/enter-ci.sh
35
43
workflows :
36
44
version : 2
37
- build :
45
+ workflow :
38
46
jobs :
47
+ - check-linear :
48
+ filters :
49
+ branches :
50
+ ignore :
51
+ - staging
52
+ - trying
53
+ - master
39
54
- build :
40
55
filters :
41
56
branches :
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ status = [
2
2
" ci/circleci: build" ,
3
3
" continuous-integration/jenkins/branch" ,
4
4
]
5
+ pr_status = [
6
+ " ci/circleci: check-linear" ,
7
+ ]
5
8
required_approvals = 1
6
9
timeout_sec = 10800 # three hour timeout
7
10
cut_body_after = " ---"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -euo pipefail
3
+
4
+ if [ 0 = " $( git rev-list --min-parents=2 --count " $( git merge-base origin/master HEAD) " ..HEAD) " ]
5
+ then
6
+ echo ' git history is linear'
7
+ else
8
+ echo ' error: nonlinear branch git history'
9
+ echo ' merge commits:'
10
+ git rev-list --min-parents=2 " $( git merge-base origin/master HEAD) " ..HEAD
11
+ exit 1
12
+ fi
You can’t perform that action at this time.
0 commit comments