PhpUnderControl持续集成设置中Git日志报错

标签 git continuous-integration cruisecontrol phpundercontrol

所以我为我的 PHP 项目设置了以下内容:

  • 包含所有代码的 Git 存储库。
  • Cruisecontrol 的一个实例,PhpUnderControl 在其上运行。

我在 cruisecontrol 项目目录中创建了一个新项目,并设置了一个轮询器以每 2 分钟检查一次 git 存储库上的更改。我在这个 Cruisecontrol 实例中运行了 2 个项目,我设置的第一个项目运行良好。

我在平台项目中遇到的问题在错误日志中看起来像这样:

2010-02-04 06:07:27,076 [Thread-14061] INFO  Project           - Project platform:  bootstrapping  
2010-02-04 06:07:27,077 [Thread-14061] INFO  ProjectController - platform Controller: build progress event: bootstrapping  
2010-02-04 06:07:27,496 [Thread-14061] INFO  GitBootstrapper   - Already up-to-date.  
2010-02-04 06:07:27,500 [Thread-14061] INFO  Project           - Project platform:  checking for modifications  
2010-02-04 06:07:27,500 [Thread-14061] INFO  ProjectController - platform Controller: build progress event: checking for modifications  
2010-02-04 06:07:27,583 [Thread-14063] WARN  Git               - warning: Log for '' only goes back to Tue, 26 Jan 2010 13:43:11 -0500.  
2010-02-04 06:07:27,584 [Thread-14063] WARN  Git               - fatal: Invalid revision range @{ 1264038932}..@{ 1265281647}  
2010-02-04 06:07:27,584 [Thread-14061] INFO  Project           - Project platform:  No modifications found, build not necessary.  
2010-02-04 06:07:27,584 [Thread-14061] INFO  Project           - Project platform:  idle  
2010-02-04 06:07:27,584 [Thread-14061] INFO  ProjectController - platform Controller: build progress event: idle

The strange thing here is that when I check the project directory, the code base gets updated. (I tested with a few small commits in my working directory.) The problem is that this never runs any of the other build processes since Git errors out.

If I go to the projects/platform directory directly and do a git pull, it works fine. Doing an ant build from the project directory also works just fine.

Here are the relevant config files:

<project name="platform" buildafterfailed="false">
    <plugin name="git" classname="net.sourceforge.cruisecontrol.sourcecontrols.Git" />

    <modificationset quietperiod="60">
        <git localWorkingCopy="projects/${project.name}/" />
    </modificationset>

    <bootstrappers>
        <gitbootstrapper localWorkingCopy="projects/${project.name}/" />
    </bootstrappers>

    <schedule interval="120">
        <ant antscript="/usr/bin/ant" buildfile="projects/${project.name}/build.xml" />
    </schedule>

    <listeners>
        <currentbuildstatuslistener file="logs/${project.name}/status.txt"/>
    </listeners>

    <log dir="logs/${project.name}">
        <merge dir="projects/${project.name}/build/logs/" />
    </log>

    <publishers>
        <artifactspublisher dir="projects/${project.name}/build/api"
                            dest="artifacts/${project.name}"
                            subdirectory="api"/>
        <artifactspublisher dir="projects/${project.name}/build/coverage"
                            dest="artifacts/${project.name}"
                            subdirectory="coverage"/>
        <execute command="phpuc graph logs/${project.name} artifacts/${project.name}"/>
        <execute command="phpcb 
                          --log projects/${project.name}/build/logs
                          --source projects/${project.name}/lib/model
                          --ouput projects/${project.name}/build/php-code-browser" />
        <artifactspublisher dir="projects/${project.name}/build/php-code-browser"
                            dest="artifacts/${project.name}"
                            subdirectory="php-code-browser" />
    </publishers>
</project>

我对 git 错误的搜索没有给我任何好的见解,所以希望这里有人知道!

最佳答案

看起来好像没有为git checkout 设置的分支。我不知道如何立即解决这个问题,但这可能是前进的方向。

关于PhpUnderControl持续集成设置中Git日志报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2201997/

相关文章:

Git: merge 到master,同时自动选择用分支覆盖master文件

node.js - 如何使用 pm2 在远程服务器上部署 angular2 应用程序

unit-testing - 强制对开发人员进行单元测试

php - VirtualBox Ubuntu LAMP 堆栈开发,使用 SVN 和 CruiseControl/phpUnderControl?

php - Cruise Control 作为 PHPUnderControl 与 Hudson for PHP

Java 代码质量趋势和统计数据(LOC、方法等)趋势

linux - 如何修复 Github 上的 REJECT NON FAST FORWARD 错误?

python - 由于文件时间戳,尝试编译 Python 失败

linux - 从以 root 身份运行的 bash 脚本向用户添加 ssh key

linux - 在 Headless Linux 上运行 Unity CLI 构建开源项目 - 许可证问题