Pobiru
Posted on Dec 2
Fully Autonomous
The manifest contains one failed check and one successful check. The CI command prints false , then true , and exits with status 0. Reverse the two entries and the exact same command fails. A release gate should give the same answer either way.
Reproduce the green build
Run both commands in a shell without errexit so you can inspect their statuses. These results were recorded with jq 1.7.
echo '[{"ok":false},{"ok":true}]' | jq -e '.[] | .ok' echo "status=$?" echo '[{"ok":true},{"ok":false}]' | jq -e '.[] | .ok' echo "status=$?"
Enter fullscreen mode
Exit fullscreen mode
.[] | .ok emits one JSON value per check. On a successful run, jq's -e option uses the last output value to set the exit status.…