From b5062dc61815deaabf4f399e9c1de3acdae37843 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Mar 21 2022 10:46:06 +0000 Subject: Remove useless use of find and rely on return code --- diff --git a/playbooks/rpm/check-for-sti-tests.yaml b/playbooks/rpm/check-for-sti-tests.yaml index 6f0e675..8431245 100644 --- a/playbooks/rpm/check-for-sti-tests.yaml +++ b/playbooks/rpm/check-for-sti-tests.yaml @@ -2,7 +2,7 @@ - hosts: localhost tasks: - name: Check for tests/tests*.yml exists - shell: "find tests/tests*.yml" + shell: "ls tests/tests*.yml" failed_when: false register: tests_stat args: @@ -12,9 +12,9 @@ zuul: child_jobs: - rpm-sti-test - when: tests_stat.stdout_lines + when: tests_stat.rc == 0 - zuul_return: data: zuul: child_jobs: [] - when: not tests_stat.stdout_lines + when: not tests_stat.rc == 0 diff --git a/playbooks/rpm/check-for-tests.yaml b/playbooks/rpm/check-for-tests.yaml index af51e11..06cd78b 100644 --- a/playbooks/rpm/check-for-tests.yaml +++ b/playbooks/rpm/check-for-tests.yaml @@ -2,7 +2,7 @@ - hosts: localhost tasks: - name: Check for tests/tests*.yml exists - shell: "find tests/tests*.yml" + shell: "ls tests/tests*.yml" failed_when: false register: tests_stat args: @@ -12,9 +12,9 @@ zuul: child_jobs: - rpm-test - when: tests_stat.stdout_lines + when: tests_stat.rc == 0 - zuul_return: data: zuul: child_jobs: [] - when: not tests_stat.stdout_lines + when: not tests_stat.rc == 0