File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"). You may
5
+ # not use this file except in compliance with the License. A copy of the
6
+ # License is located at
7
+ #
8
+ # http://aws.amazon.com/apache2.0/
9
+ #
10
+ # or in the "license" file accompanying this file. This file is distributed
11
+ # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12
+ # express or implied. See the License for the specific language governing
13
+ # permissions and limitations under the License.
14
+
15
+ if [ -z " $BUILDKITE_PULL_REQUEST_BASE_BRANCH " ]; then
16
+ # only run on pull requests
17
+ exit 0
18
+ fi
19
+
20
+ found_fixups=0
21
+ missing_dco=0
22
+
23
+ for sha in $( git log --no-merges --pretty=%H --no-decorate \
24
+ " ${BUILDKITE_PULL_REQUEST_BASE_BRANCH} " ..HEAD) ; do
25
+ git show --pretty=oneline --no-decorate --no-patch $sha \
26
+ | fgrep -q ' fixup!' && {
27
+ found_fixups=1
28
+ echo " Found fixup commit $sha "
29
+ }
30
+
31
+ git show --pretty=medium --no-decorate --no-patch $sha \
32
+ | fgrep -q Signed-off-by: || {
33
+ missing_dco=1
34
+ echo " Missing DCO on $sha "
35
+ }
36
+ done
37
+
38
+ status=0
39
+ if [ $found_fixups -gt 0 ]; then
40
+ status=1
41
+ else
42
+ echo " Found no fixup commits"
43
+ fi
44
+
45
+ if [ $missing_dco -gt 0 ]; then
46
+ status=1
47
+ else
48
+ echo " All commits have Signed-off-by signature"
49
+ fi
50
+
51
+ exit $status
Original file line number Diff line number Diff line change 33
33
# multiple go builds are downloading to the same cache.
34
34
- wait
35
35
36
+ - label : ' git log validation'
37
+ command : ' ./.buildkite/logcheck.sh'
38
+
36
39
- label : ' build'
37
40
commands :
38
41
- ' make'
You can’t perform that action at this time.
0 commit comments