Skip to content

[FYI] lib/tasks/gitlab/check: Exit with non-zero code, if something failed in a check task

This is handy for monitoring tools, which could e.g. periodically call check tasks and instead of parsing output, rely on exit code.

The way we detect if something failed is via hooking into String#red, and if anything was ever printed in red - that's an error.

( I'm not sure if implementation is good, but at least it works, and I wanted to share. FYI )

/cc @dzaporozhets

Merge request reports

Loading