Skip to content

Commit 33959de

Browse files
committed
Add b to file
Signed-off-by: Paul Belanger <[email protected]>
1 parent 29e0602 commit 33959de

File tree

3 files changed

+31
-17
lines changed

3 files changed

+31
-17
lines changed

.zuul.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
- job:
2-
name: dco
2+
name: dco-license-check
33
run: playbooks/dco/run.yaml
44

55
- project:
66
templates:
77
- build-tox-docs
88
check:
99
jobs:
10-
- dco
10+
- dco-license-check
1111
post:
1212
jobs:
1313
- tox-docs

playbooks/dco/run.yaml

+28-15
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
- hosts: all
22
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
619
chdir: "{{ zuul.project.src_dir }}"
20+
executable: /bin/bash
21+
register: _dco
22+
failed_when: _dco.rc > 1
723

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.
1228
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

test.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
new line
2+
b

0 commit comments

Comments
 (0)