Failed Build? Never Again!

Oh, a failed test again! And not on your local machine but on the CI server! Which means the whole team starts yelling at you in a minute!

What to do, oh, what to do?! Unfortunately this time it is hard to avoid bashing, but let us see what can be done so you never have to go through such shameful situation again.

The trick is very simple and consists of two steps.

Forever Green

Log to your CI server. Find the installation directory and look for img subdirectory. Go there and locate the "bulb" graphic files which are used to show the build status. Depending on the CI server it should be named like red.png, failed.jpg, passed.gif or sth like this. Now execute the following commands that will replace the unwanted statuses (failed build, failed tests) with a positive ones. For example:

cp green.png red.png
cp green.png yellow.png

You get the idea, right? So since now your CI server will never go red again. Yabba-dabba-do! :)

Fight the Spam!

But this is not the end yet! CI servers got this nasty habit of sending emails when build fails. Obviously they are not required anymore since all your builds are green. So let us save your colleagues (and PMs) from the avalanche of spam mails sent by CI server.

In case you haven't noticed, this post was published on April Fool's Day! :)

Now there are two few you could follow. First, you could configure every CI job so it does not send notifications in the case of failure. Well, yes but this is plenty of work. So maybe you could misconfigure the SMTP service on the CI machine? Yeah, that should solve the problem once and for all!

Keep on Coding

And now you can go back to what you love doing so much. Sit down, code, and never again be interrupted by the CI server! Code in peace! :)

If this goes viral...

I'm coming for you Tomek. :P And not on April Fools day. And God help you if someone pulls this idea here...

Seriously though, can't stop laughing...


This used to be my blog. I moved to long time ago.


Please comment using