#98 Ensure rpm-lint check rpm / srpm and spec file
Merged 3 years ago by zuul. Opened 3 years ago by fbo.
fbo/zuul-distro-jobs rlint  into  master

@@ -5,12 +5,18 @@ 

      state: latest

    become: true

  

- - name: Fetch rpm

+ - name: Fetch rpms

    get_url:

      url: "{{ item }}"

-     dest: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/{{ item | basename }}"

+     dest: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/"

    loop: "{{ rpms }}"

  

+ - name: Fetch srpm

+   get_url:

+     url: "{{ srpm }}"

+     dest: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/"

+   when: srpm is defined

+ 

  - name: Get rpmlintrc path

    shell: ls {{ ansible_user_dir }}/{{ zuul.project.src_dir }}/*.rpmlintrc

    register: rpmlintrc_check
@@ -22,4 +28,6 @@ 

    when: rpmlintrc_check is succeeded

  

  - name: Run rpmlint

-   shell: rpmlint {% if rpmlintrc | default("") %} --file {{ rpmlintrc }} {% endif %} {{ ansible_user_dir }}/{{ zuul.project.src_dir }}/*.rpm

+   shell: rpmlint {% if rpmlintrc | default("") %} --file {{ rpmlintrc }} {% endif %} ./

+   args:

+     chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"

This change fetches the sprm is available in the local directory.
The rpmlint command is now called on the directory to automatically
discover content to lint.

Build succeeded.

rebased onto e778ada

3 years ago

Build succeeded.

Metadata Update from @fbo:
- Pull-request tagged with: gateit

3 years ago

Build succeeded (gate pipeline).

Pull-Request has been merged by zuul

3 years ago
Metadata