Skip to content

Commit

Permalink
Add check for README + add missing README
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Jul 24, 2024
1 parent 98a8ba2 commit b3d475c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/portworx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# `portworx`
22 changes: 22 additions & 0 deletions zuul.d/playbooks/build-collection/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@
- name: Prepare for collection build
hosts: all
tasks:
- name: Find all roles
find:
paths: "{{ zuul.project.src_dir }}/roles/"
file_type: directory
register: role_dirs

- name: Check for README.md in each role
stat:
path: "{{ item.path }}/README.md"
register: readme_check
loop: "{{ role_dirs.files }}"
loop_control:
label: "{{ item.path }}"

- name: Fail if any role is missing README.md
fail:
msg: "Missing README.md in role {{ item.item.path }}"
when: not item.stat.exists
loop: "{{ readme_check.results }}"
loop_control:
label: "{{ item.item.path }}"

- name: Pin all image digests
ansible.builtin.include_role:
name: tox
Expand Down

0 comments on commit b3d475c

Please sign in to comment.