Teamcity status macro for Trac

I had a need to print the build status of our teamcity server in trac. After researching various solutions, I figured a trac macro would best fit. It was a surprisingly simple solution so I figured I would share it here.

I created a file called “” and placed it into my trac/plugins folder.

from urllib import urlopen
from import WikiMacroBase

class TeamCityStatusMacro(WikiMacroBase):
“””Inserts the current build status into the wiki page.”””

def expand_macro(self, formatter, name, args):
return res

Obviously change the URL open line to match your teamcity installed location.

Then inside any wiki page on your trac site, just place the macro command “[[TeamCityStatus]]”. You should be good to go!

This entry was posted in internet, programming, tech and tagged , , , . Bookmark the permalink.

1 Response to Teamcity status macro for Trac

  1. Arie says:

    Thanks for that. Works great.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s