File tree 3 files changed +31
-17
lines changed
3 files changed +31
-17
lines changed Original file line number Diff line number Diff line change 1
1
- job :
2
- name : dco
2
+ name : dco-license-check
3
3
run : playbooks/dco/run.yaml
4
4
5
5
- project :
6
6
templates :
7
7
- build-tox-docs
8
8
check :
9
9
jobs :
10
- - dco
10
+ - dco-license-check
11
11
post :
12
12
jobs :
13
13
- tox-docs
Original file line number Diff line number Diff line change 1
1
- hosts : all
2
2
tasks :
3
- - name : chell
4
- shell : git remote -v
5
- args :
3
+ - name : Developer Certificate of Origin (DCO) license check
4
+ shell :
5
+ cmd : |
6
+ set -e
7
+ result=0
8
+ for commit in $(git cherry -v origin/{{ zuul.branch }} HEAD | cut -d " " -f2)
9
+ do
10
+ if ! git show -s $commit | grep -q "Signed-off-by:"; then
11
+ echo "---"
12
+ git show -s $commit
13
+ echo "---"
14
+ echo "does not have a Signed-off-by header"
15
+ result=1
16
+ fi
17
+ done
18
+ exit $result
6
19
chdir : " {{ zuul.project.src_dir }}"
20
+ executable : /bin/bash
21
+ register : _dco
22
+ failed_when : _dco.rc > 1
7
23
8
- - name : chell
9
- shell : git log origin/master..HEAD
10
- args :
11
- chdir : " {{ zuul.project.src_dir }} "
24
+ - name : License check failed
25
+ fail :
26
+ msg : |
27
+ One or more commits have not been signed properly using --signoff.
12
28
13
- - name : shell
14
- shell : |
15
- for commit in $(git cherry master | cut -d " " -f2)
16
- do
17
- echo $commit
18
- done
19
- args :
20
- chdir : " {{ zuul.project.src_dir }}"
29
+ The meaning of a signoff depends on the project, but it typically
30
+ certifies that committer has the rights to submit this work under
31
+ the same license and agrees to a Developer Certificate of Origin
32
+ (see http://developercertificate.org/ for more information).
33
+ when : _dco.rc != 0
Original file line number Diff line number Diff line change 1
1
new line
2
+ b
You can’t perform that action at this time.
0 commit comments