Found a plugin for jenkins that does this for me :P