Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ci3/source_redis
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ function redis_cli {
}

function redis_setexz {
# No-op when redis is unavailable, but still drain stdin: otherwise the upstream
# producer feeding this pipeline gets SIGPIPE, which under `set -o pipefail` fails
# the caller (e.g. bootstrap_ec2's "CI booting..." log write killing the whole run).
if [ "$CI_REDIS_AVAILABLE" -ne 1 ]; then
cat >/dev/null
return 0
fi
gzip | redis_cli -x SETEX $1 $2 &>/dev/null
}

Expand Down
Loading