How do I setup an external status page in TeamCity like their standard one that won't require me to login?

StackOverflow https://stackoverflow.com/questions/1806121

  •  05-07-2019
  •  | 
  •  

Question

We have just moved from CCNET to TeamCity for Continuous Integration.

In TeamCity, I can use the ExternalStatus page/widget fine.

We run Cradiator (http://cradiator.codeplex.com) as a build radiator and notifier in our room and I have modified the Team Piazza TeamCity plug-in to return XML in the CCNET format so Cradiator can read it.

The problem I have is that the modified TeamPiazza page needs authentication, whereas the TeamCity externalstatus page doesn't.

So my question is: how can I make the custom page I have not require authentication?

Was it helpful?

Solution

TeamCity provides the AuthorizationInterceptor interface in their Open API that you can inject into your plugin code which allows you to control the authorisation requirement.

shamelessPlug This is what I used when writing the tcMonitor status page. /shamelessPlug

Here is example code on how to use it:

    /* Add the objects into the constructor and spring will make them 
       available for you */
    public StatusPageController(SBuildServer server,
            AuthorizationInterceptor authorizationInterceptor,
            UrlMapping urlMapper) {

        // Tell teamcity that auth is not required for this page.
        authorizationInterceptor.addPathNotRequiringAuth(myUrl);

OTHER TIPS

you should post directly to the support forum http://www.jetbrains.net/devnet/community/teamcity/teamcity and post the answer back here if you want.

If a Guest User is enabled in TeamCity you can access the page with the HTTP access pattern for guest authentication.

For example if your page is

http://buildserver/teamcity/piazza.htm

you can access it by appending a /guestAuth into the URL:

http://buildserver/teamcity/guestAuth/piazza.htm
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top