Hudson -CI 屏幕保护程序设置

发布于 2024-09-27 16:51:00 字数 126 浏览 3 评论 0原文

您好,有没有我可以设置一个屏幕保护程序,其中包含在 hudson 中运行的项目列表,该列表指示项目的状态。假设屏幕保护程序的部分表示项目成功,则显示绿色,如果项目构建失败,则显示红色。

可能屏幕保护程序必须分区到多个项目!

HI , Is there any I can setup a screen saver with the list of projects running in hudson which indicates the status of the project. Say the part of the screen saver indicates green for projects got succeded , and shows the red if the project is failed to build.

Probably the screen saver must be partitioned to multiple projects !!!

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

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

发布评论

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

评论(4

泛滥成性 2024-10-04 16:51:00

您可以在任何合适的环境中创建一些东西,例如Flex / AS3。可以读取 XML 并生成您需要的屏幕保护程序设计和可执行文件(取决于您的目标平台)

您可以创建一个简单的网页并通过 AJAX 使用 hudson 数据,并以 HTML/CSS 呈现您的显示,就可以了对你来说,但这其实是微不足道的。

Hudson 将通过其基本 API(本例中为 XML)提供当前的作业列表及其状态颜色

http://hostname:8080/api/xml 

将产生类似...

 <hudson>
   <assignedLabel></assignedLabel>
   <mode>NORMAL</mode>
   <nodeDescription>the master Hudson node</nodeDescription>
   <nodeName></nodeName>
   <numExecutors>5</numExecutors>
   <job>
     <name>JobOne</name>
     <url>http://hostname:8080/job/JobOne/</url>
     <color>blue</color>
   </job>
   <job>
     <name>JobTwo</name>
     <url>http://hostname:8080/job/JobTwo/</url>
     <color>blue</color>
   </job>
   <job>
     <name>JobThree</name>
     <url>http://hostname:8080/job/JobThree/</url>
     <color>blue</color>
   </job>
   <overallLoad></overallLoad>
   <primaryView>
     <name>All</name>
     <url>http://hostname:8080/</url>
   </primaryView>
   <slaveAgentPort>0</slaveAgentPort>
   <useCrumbs>false</useCrumbs>
   <useSecurity>true</useSecurity>
   <view>
     <name>All</name>
     <url>http://hostname:8080/</url>
   </view>
   <view>
     <name>Dashboard</name>
     <url>http://hostname:8080/view/Dashboard/</url>
   </view>
 </hudson>

您会对这些节点感兴趣...

   <job>
     <name>JobOne</name>
     <url>http://hostname:8080/job/JobOne/</url>
     <color>blue</color>
   </job>
   <job>
     <name>JobTwo</name>
     <url>http://hostname:8080/job/JobTwo/</url>
     <color>blue</color>
   </job>
   <job>
     <name>JobThree</name>
     <url>http://hostname:8080/job/JobThree/</url>
     <color>blue</color>
   </job>

这将很容易选择并获取所需的颜色(构建状态为红色或蓝色)和作业名称。如果您想要更多信息,我很乐意将一些基本内容放在一起。

更新:非常基本的 Flex 示例。

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns="*" creationComplete="start()">

    <!-- The HTTPService request -->
    <mx:HTTPService id="jobsRequest" url="http://localhost:8080/api/xml" useProxy="false" method="POST">
        <mx:request xmlns="">
        </mx:request>
    </mx:HTTPService>

    <!-- basic timer to trigger the data request from Hudson -->
    <mx:Script>
        <![CDATA[
            import flash.utils.Timer;
            import flash.events.TimerEvent;

            private var t:Timer = new Timer(5000, 0); // repeat every 5 seconds;

            private function start():void {
              t.addEventListener(TimerEvent.TIMER, getHudsonStatus);
              t.start();
            }

            private function getHudsonStatus(e:TimerEvent):void {
                jobsRequest.send();
            }
        ]]>
    </mx:Script>

    <!-- the view -->
    <mx:DataGrid id="hudsonJobsDataGrid" x="22" y="128" dataProvider="{jobsRequest.lastResult.hudson.job}">
        <mx:columns>
            <mx:DataGridColumn headerText="Name" dataField="status"/>
            <mx:DataGridColumn headerText="Status" dataField="color"/>
        </mx:columns>
    </mx:DataGrid>

</mx:Application>

这相当蹩脚,但它正在执行您需要的数据检索,Flex 4或Silverlight将为您提供更好的数据驱动列表,使用ItemRenders(Flex4 Spark)或DataTemplates(Silverlight),我认为Flex4路线将需要更少的代码,并且如果它必须是一个屏幕保护程序,将 SWF 转换为屏幕保护程序相当简单,并且有很多工具可用于自动化该过程。

更新 2:稍好一点的 Flex 4 示例...

我使用 Spark 组件(DataGroup + ItemRenderer)使用 Flex 4 创建了一个更好的视图作为全屏 AIR 应用程序,它在这里 http://gist.github.com/623167 作为来源。需要 Flashbuilder4 或 AIR SDK 来构建它。当然这不是成品!

它看起来像这样...:https://i.sstatic.net/8I92U.png - 当它监视 http://deadlock.netbeans.org/hudson

You can create something in any suitable environment e.g. Flex / AS3. that can read XML and also generate the sort of screensaver design and executable you need (depending on your target platform)

You could just create to a straightforward webpage and consume the hudson data over AJAX, and render your display in HTML/CSS, it's up to you, but it's fairly trivial to do.

Hudson will provide the current list of jobs and their status color over it's basic API (XML in this example)

http://hostname:8080/api/xml 

Will yield something like...

 <hudson>
   <assignedLabel></assignedLabel>
   <mode>NORMAL</mode>
   <nodeDescription>the master Hudson node</nodeDescription>
   <nodeName></nodeName>
   <numExecutors>5</numExecutors>
   <job>
     <name>JobOne</name>
     <url>http://hostname:8080/job/JobOne/</url>
     <color>blue</color>
   </job>
   <job>
     <name>JobTwo</name>
     <url>http://hostname:8080/job/JobTwo/</url>
     <color>blue</color>
   </job>
   <job>
     <name>JobThree</name>
     <url>http://hostname:8080/job/JobThree/</url>
     <color>blue</color>
   </job>
   <overallLoad></overallLoad>
   <primaryView>
     <name>All</name>
     <url>http://hostname:8080/</url>
   </primaryView>
   <slaveAgentPort>0</slaveAgentPort>
   <useCrumbs>false</useCrumbs>
   <useSecurity>true</useSecurity>
   <view>
     <name>All</name>
     <url>http://hostname:8080/</url>
   </view>
   <view>
     <name>Dashboard</name>
     <url>http://hostname:8080/view/Dashboard/</url>
   </view>
 </hudson>

You'd be interested in these nodes...

   <job>
     <name>JobOne</name>
     <url>http://hostname:8080/job/JobOne/</url>
     <color>blue</color>
   </job>
   <job>
     <name>JobTwo</name>
     <url>http://hostname:8080/job/JobTwo/</url>
     <color>blue</color>
   </job>
   <job>
     <name>JobThree</name>
     <url>http://hostname:8080/job/JobThree/</url>
     <color>blue</color>
   </job>

Which would be easy to select and get the required color (build status is red or blue) and job name. If you want more info I'd be happy to throw something basic together.

Update: Very Basic Flex Example.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns="*" creationComplete="start()">

    <!-- The HTTPService request -->
    <mx:HTTPService id="jobsRequest" url="http://localhost:8080/api/xml" useProxy="false" method="POST">
        <mx:request xmlns="">
        </mx:request>
    </mx:HTTPService>

    <!-- basic timer to trigger the data request from Hudson -->
    <mx:Script>
        <![CDATA[
            import flash.utils.Timer;
            import flash.events.TimerEvent;

            private var t:Timer = new Timer(5000, 0); // repeat every 5 seconds;

            private function start():void {
              t.addEventListener(TimerEvent.TIMER, getHudsonStatus);
              t.start();
            }

            private function getHudsonStatus(e:TimerEvent):void {
                jobsRequest.send();
            }
        ]]>
    </mx:Script>

    <!-- the view -->
    <mx:DataGrid id="hudsonJobsDataGrid" x="22" y="128" dataProvider="{jobsRequest.lastResult.hudson.job}">
        <mx:columns>
            <mx:DataGridColumn headerText="Name" dataField="status"/>
            <mx:DataGridColumn headerText="Status" dataField="color"/>
        </mx:columns>
    </mx:DataGrid>

</mx:Application>

This is pretty crappy, but it's doing the data retrieval you need, Flex 4 or Silverlight will give you better data driven lists, with ItemRenders (Flex4 Spark) or DataTemplates (Silverlight), I think the Flex4 route will require less code, and if it MUST be a screensaver, it's fairly simple to convert SWF's to Screensavers, and a lot of tools are available to automate the process.

Update 2: Slightly better Flex 4 example...

I've created a nicer view as a fullscreen AIR Application with Flex 4 using Spark components (DataGroup + ItemRenderer) it's here http://gist.github.com/623167 as source. Flashbuilder4 or the AIR SDK is required to build it. It's not a finished product of course!

It looks like this... : https://i.sstatic.net/8I92U.png - when it was monitoring http://deadlock.netbeans.org/hudson

最佳男配角 2024-10-04 16:51:00

安装 Hudson 的 Radiator View 插件;这应该提供您想要的功能。

Install the Radiator View plugin for Hudson; this should provide the functionality you want.

归属感 2024-10-04 16:51:00

您可以尝试使用 Buildron 等构建散热器。它也支持 Hudson,并且是让整个团队了解构建状态最新信息的非常酷的方式。

在此处输入图像描述

除了 3D 环境之外,它还具有声音以及适用于 iOS 和 Android 的移动应用程序,您可以在其中与其交互。

You can try a build radiator like Buildron. It supports Hudson too and is very cool way to keep the whole team updated about the builds status.

enter image description here

besides the 3D environment, it has sound and a mobile app for iOS and Android where you can interact with it.

昵称有卵用 2024-10-04 16:51:00

Team Build Screen 可以完全满足您的需要,但目前仅支持 TFS 2008/2010。幸运的是,我目前正在开发 1.4.0 版本,其中包括对 Hudson 的支持。如果您有兴趣,请关注最新源代码: http://teambuildscreen.codeplex.com /SourceControl/list/changesets。基本支持已签入,但尚未包含在版本中。

您可以下载源代码并自行构建,该项目名为 TeamBuildScreen.DesktopHudson。

有关该项目的更多详细信息,请访问:http://teambuildscreen.codeplex.com/

Team Build Screen would do exactly what you need, but currently only supports TFS 2008/2010. Fortunately I am presently working on version 1.4.0 which includes support for Hudson. If you are interested, keep an eye on the latest source code: http://teambuildscreen.codeplex.com/SourceControl/list/changesets. Basic support has been checked in but has not yet been wrapped up into a release.

You can download the source and build it yourself, the project is called TeamBuildScreen.DesktopHudson.

More details about the project can be found at: http://teambuildscreen.codeplex.com/

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