Skip to content

Commit 164a5a7

Browse files
committed
Add b to file
1 parent 29e0602 commit 164a5a7

2 files changed

Lines changed: 22 additions & 16 deletions

File tree

playbooks/dco/run.yaml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
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 "Commt $commit does not have a Signed-off-by header"
12+
git show -s $commit
13+
result=1
14+
fi
15+
done
16+
exit $result
617
chdir: "{{ zuul.project.src_dir }}"
18+
executable: /bin/bash
19+
register: _dco
20+
ignore_errors: True
721

8-
- name: chell
9-
shell: git log origin/master..HEAD
10-
args:
11-
chdir: "{{ zuul.project.src_dir }}"
12-
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 }}"
22+
- name: License check failed
23+
fail:
24+
msg: Something is wrong
25+
when: _dco.rc != 0

test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
new line
2+
b

0 commit comments

Comments
 (0)