Skip to content

Commit a03ce76

Browse files
authored
fix(ci): prevent grep pipe from failing the diagnostics step (#2170)
grep exits 1 when no match is found. Under bash -e with pipefail, this would abort the failure-capture step before it finishes, defeating its purpose. Use grep -m1 with || true to ensure the step always succeeds. Signed-off-by: Bruno Verachten <gounthar@gmail.com>
1 parent 0b94e4a commit a03ce76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/plugin_update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ jobs:
8181
echo "=== Container status ==="
8282
docker ps -a
8383
echo "=== Jenkins controller logs ==="
84-
CTRL=$(docker ps -a --format "{{.Names}}" | grep controller | head -1)
84+
CTRL=$(docker ps -a --format "{{.Names}}" | grep -m1 controller || true)
8585
[ -n "$CTRL" ] && docker logs "$CTRL" 2>&1 | tail -200 || echo "No controller container found"

0 commit comments

Comments
 (0)