How to make a manual job always exit with success on GitLab CI?

On my Gitlab CI I run the gem https://rubygems.org/gems/brakeman as a manual stage. When it finds any warning or error, on Gitlab CI in the end, after it's gone through all the code, it exits with error 1 and gets rendered as yellow.

enter image description here

enter image description here

I want it to always exit with success - green. Then I'll examine its output myself for warnings and errors it found in my code.

How can I make it always return success and get rendered with the green colour?

1 answer

  • answered 2018-10-12 08:10 Rekovni

    You should be able to just prepend | true to your command for it to always succeed.

    eg: gem https://rubygems.org/gems/brakeman | true