From 3459323a1fa039349d6dae83046b489673503dc2 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Mon, 15 Apr 2024 09:46:23 -0400 Subject: [PATCH] ci/prow-entrypoint.sh: don't use `grep -q` at the end of pipeline Unlike `grep`, `grep -q` will exit 0 as soon as a match is found. This will cause whatever is writing into `grep` to hit `SIGPIPE`. And if it's not equipped to handle that signal, it'll be terminated and the overall if-condition will always fail due to `-o pipefail`. See also https://github.com/ostreedev/ostree/pull/3203. --- ci/prow-entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/prow-entrypoint.sh b/ci/prow-entrypoint.sh index fd2e7034..62ce382a 100755 --- a/ci/prow-entrypoint.sh +++ b/ci/prow-entrypoint.sh @@ -126,12 +126,12 @@ kola_test_qemu() { variant="$(jq --raw-output '."coreos-assembler.config-variant"' 'src/config.json')" manifest="src/config/manifest-${variant}.yaml" fi - if cosa kola list --json | jq -r '.[].Name' | grep -q "basic.nvme"; then - if rpm-ostree compose tree --print-only "${manifest}" | jq -r '.packages[]' | grep -q "centos-stream-release"; then + if cosa kola list --json | jq -r '.[].Name' | grep "basic.nvme"; then + if rpm-ostree compose tree --print-only "${manifest}" | jq -r '.packages[]' | grep "centos-stream-release"; then args+="--denylist-test *.uefi-secure" fi else - if ! rpm-ostree compose tree --print-only "${manifest}" | jq -r '.packages[]' | grep -q "centos-stream-release"; then + if ! rpm-ostree compose tree --print-only "${manifest}" | jq -r '.packages[]' | grep "centos-stream-release"; then cosa kola --basic-qemu-scenarios --output-dir ${ARTIFACT_DIR:-/tmp}/kola-basic else cosa kola --basic-qemu-scenarios --skip-secure-boot --output-dir ${ARTIFACT_DIR:-/tmp}/kola-basic