How to set up an external status page in TeamCity, like its standard one, which will not require me to log in?

We just migrated from CCNET to TeamCity for Continuous Integration .

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

We run Cradiator ( http://cradiator.codeplex.com ) as a build radiator and notifier in our room, and I changed Team Piazza TeamCity Plugin to return XML in CCNET format so that Cradiator can read it.

The problem is that authentication for the modified TeamPiazza page requires authentication, while there is no TeamCity external content page.

So my question is: how can I create a custom page for which I do not require authentication?

+3
source share
3 answers

TeamCity provides an AuthorizationInterceptor interface in its Open API, which you can enter into your plugin code, which allows you to control the authorization requirement,

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

Here is a sample 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);
+2
source

If a User Guest is included in TeamCity , you can access the page using the HTTP Access Template for guest authentication .

For example, if your page

http://buildserver/teamcity/piazza.htm

you can access it by adding the URL / guestAuth to the url:

http://buildserver/teamcity/guestAuth/piazza.htm
0
source

Source: https://habr.com/ru/post/1724049/


All Articles