I have a jenkins ci job that runs some shell commands (linux). Specifically I'm cd-ing into a git repo and using git add remote to make sure the remote is set before running other commands. Typically the remote is still there and there's stderr output saying "fatal: remote foo already exists" which is fine by me, but mr. Jenkins halts the job and marks it as failed.
How can I tell Jenkins to ignore this stderr or that it's expected? Or is there a smarter approach to this?
Thanks in advance.
git add remote git_repo || true
this will return a 0 exit status
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With