如何在 TeamCity 中设置一个外部状态页面,就像他们的标准页面一样,不需要我登录?

发布于 2024-08-13 05:32:04 字数 741 浏览 3 评论 0原文

我们刚刚从 CCNET 迁移到 TeamCity 用于持续集成

在 TeamCity 中,我可以很好地使用ExternalStatus 页面/小部件。

我们运行 Cradiator (http://cradiator.codeplex.com) 作为我们房间中的构建散热器和通知程序,我已修改 Team Piazza TeamCity 插件以返回 CCNET 格式的 XML这样 Cradiator 就可以读取它。

我遇到的问题是修改后的 TeamPiazza 页面需要身份验证,而 TeamCity externalstatus 页面则不需要。

所以我的问题是:如何使自定义页面不需要身份验证?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

绿光 2024-08-20 05:32:04

TeamCity 在其 Open 中提供 AuthorizationInterceptor 接口您可以将 API 注入到插件代码中,从而允许您控制授权要求。

shamelessPlug这是我在编写 tcMonitor 状态页面时使用的。 /shamelessPlug

以下是有关如何使用它的示例代码:

    /* 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);

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);
把梦留给海 2024-08-20 05:32:04

您应该直接发帖到支持论坛 http://www.jetbrains.net/devnet/ Community/teamcity/teamcity 并将答案发布回此处(如果需要)。

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.

甜味拾荒者 2024-08-20 05:32:04

如果在 TeamCity 中启用了 来宾用户,您可以使用 访客身份验证的 HTTP 访问模式

例如,如果您的页面是,

http://buildserver/teamcity/piazza.htm

您可以通过在 URL 中附加 /guestAuth 来访问它:

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文