Skip to content

Commit

Permalink
ci/prow-entrypoint.sh: don't use grep -q at the end of pipeline
Browse files Browse the repository at this point in the history
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 ostreedev/ostree#3203.
  • Loading branch information
jlebon committed Apr 15, 2024
1 parent d35fed3 commit 3459323
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ci/prow-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3459323

Please sign in to comment.