`
lovefly_zero
  • 浏览: 387104 次
  • 性别: Icon_minigender_1
  • 来自: 株洲
社区版块
存档分类
最新评论

Use Hudson之管理Hudson

    博客分类:
  • CI
阅读更多

译自:http://wiki.hudson-ci.org/display/HUDSON/Administering+Hudson

HUDSON_HOME主目录

 

   Hudson需要一些磁盘空间来执行构建和保存归档。您能通过Hudson的配置截面来检查这个位置。

   默认情况下,它被设置在~/.hudson(PS:~也就是C:\Documents and Settings\XXX)。但是,您可以通过下列方式改变它的位置:

  • 首先您会把hudson.war存放在servlet容器的发布目录,那么在启动servlet容器前先设置“HUDSON_HOME”环境变量并添加一个新的地址做为Hudson的主目录。(PS:我个人推荐这么做。)
  • 在servlet容器中设置“HUDSON_HOME”系统属性。
  • 设置JNDI环境时输入“HUDSON_HOME”指向新的目录。

   更多的关于如何在您的容器中安装它请查阅容器详细文档归集

   你也可以在使用Hudson一段时间以后再来改变这个地址。要做到这一点,您必须完全停止Hudson,把旧的HUDSON_HOME下所有的内容移动到新的目录,设置新的HUDSON_HOME,然后重启Hudson。

    HUDSON_HOME包含一个相当清晰的目录结构,如下所示:

    HUDSON_HOME  +- config.xml (hudson基础配置)
                               +- *.xml (其他站点范围内的配置文件)
                               +- userContent (此目录中的文件将被送达您的http://server/hudson/userContent/。)
                               +- fingerprints (存储指纹记录,关于fingerprints请查阅文件指纹识别)
                               +- plugins (存储插件集)
                               +- jobs
                                          +- [JOBNAME] (为每个作业定义一个子目录)
                                               +- config.xml (作业配置文件)
                                               +- workspace (为版本控制系统而工作的目录)
                                               +- latest (这个符号关联到最近的成功构建。)
                                               +- builds
                                                    +- [BUILD_ID] (每次构建的记录号,标识为记录到秒的时间)
                                                    +- build.xml (记录构建产生的摘要)
                                                    +- log (日志)
                                                    +- changelog.xml (变更日志)
    PS:抱歉latest 我没找到,但我发现了nextBuildNumber,里面的数字同样代表了最近成功构建的编号。

备份和还原

   所有的设置、构建日志和构件归档都是存储在HUDSON_HOME 目录下。所以,您只要简单的对这个目录做一个备份即可(PS:为备份目录定义一个日期是良好的习惯)。同理,还原数据也仅仅从一个备份中替换当前HUDSON_HOME目录的内容。

   备份的时候您不需要停止服务器,但是,还原的时候则请停止服务器。

  

移动、复制、重命名作业

    您可以:

  1. 通过从一个已安装的Hudson中简单复制相应作业目录的方式移动一个作业到另一个作业目录。
  2. 通过在同一个作业目录下复制并重命名一个已存在的作业。
  3. 通过重命名一个目录来重命名一个作业。

    这些操作即使在Hudson正在运行的时候也能通过。当然,您要让这些更改生效的话,必须点击“Reload Configuration from Disk”,以迫使Hudson从磁盘中重载配置。

   

归集未使用的作业

   有时候,您想从Hudson中移除一个作业,但是稍后又能以同样的方式来恢复它,如果这么做有必要的话。为此,您能通过定位到$HUDSON_HOME然后创建一个作业目录的归档来实现它。下面的命令描述了如何归档一个作业“XYZ”然后删除它。

 

    $ cd $HUDSON_HOME/jobs
    $ tar czf xyz.tgz xyz
    //去Hudson图形界面,先点击 "Manage Hudson",然后点击"Reload Configuration from Disk"。

    只要你不是在创建一个xyz归档的同时构建此项目,您就可以不用让Hudson脱机后再来执行此操作。

1
0
分享到:
评论

相关推荐

    hudson-3.3.1.war

    For Production use, Hudson 3.3.1 from the Eclipse Foundation is now available. This WAR file is suitable for any O/S. We recommend that users of 3.0, 3.1, 3.2 or 3.3.0 upgrade to this release. his ...

    openssl-0.9.8d.tar.tar

    Hudson. The OpenSSL toolkit is licensed under an Apache-style licence, which basically means that you are free to get and use it for commercial and non-commercial purposes subject to some simple ...

    OpenSSL 0.9.8y

    Hudson. The OpenSSL toolkit is licensed under an Apache-style licence, which basically means that you are free to get and use it for commercial and non-commercial purposes subject to some simple ...

    Jenkins权威指南.docx

    Should I Use Jenkins or Hudson? 5 Introducing Continuous Integration into Your Organization 6 Phase 1—No Build Server 6 Phase 2—Nightly Builds 6 Phase 3—Nightly Builds and Basic Automated Tests 6 ...

    libopenssl1_0_0-1.0.0-5.4.x86_64

    Hudson. The OpenSSL toolkit is licensed under an Apache-style license, which basically means that you are free to get it and to use it for commercial and noncommercial purposes. Authors: -------- ...

    openssl 1.0.0 天涯浪子

    Hudson. The OpenSSL toolkit is licensed under an Apache-style licence, which basically means that you are free to get and use it for commercial and non-commercial purposes subject to some simple ...

    nmap-6.49BETA5.tar

    * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software ...

    Python Testing Cookbook.pdf

    You will learn how to use popular continuous integration systems like Jenkins (formerly known as Hudson) and TeamCity to automatically test your code upon check in. This book explores Python’s built...

    最新版GDAL,有关开源遥感处理的

    Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller, Sergio Monesi, Keith Owens, George ...

    OpenSSL 1.0

    Hudson. The OpenSSL toolkit is licensed under a dual-license (the OpenSSL license plus the SSLeay license) situation, which basically means that you are free to get and use it for commercial and ...

    PRS-505_Service_Schematic.pdf

    • This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. ( org/>) Copyright © 1998-2006 The OpenSSL Project. All rights reserved. This product includes ...

    PHP差异分析工具TryLib.zip

     -n, --diff-only Create diff, but do not send to Hudson  -v, --verbose Verbose (show shell commands as they're run)  -p, --patch ... Path to patch file to use instead ...

Global site tag (gtag.js) - Google Analytics