当 svn 指向 url 时 CruiseControl修改集无法执行

发布于 2024-09-01 19:54:36 字数 1210 浏览 6 评论 0原文

在我当前的 CruiseControl 设置中,我正在运行以下目标:

<modificationset quietperiod="30">
       <svn RepositoryLocation="http://my/url/repo/trunk" />
</modificationset>

我对空白文本文件进行了简单的签入,随后在 CruiseControl 日志中收到的消息如下:

[cc]May-13 15:53:56 Project       - Project mine:  bootstrapping
[cc]May-13 15:53:56 jectController- mine Controller: build progress event: bootstrapping
[cc]May-13 15:53:56 Project       - Project mine:  checking for modifications
[cc]May-13 15:53:56 jectController- mine Controller: build progress event: checking for modifications
[cc]May-13 15:53:59 Project       - Project mine:  No modifications found, build not necessary.
[cc]May-13 15:53:59 Project       - Project mine:  idle
[cc]May-13 15:53:59 jectController- connectfour Controller: build progress event: idle
[cc]May-13 15:53:59 Project       - Project mine:  next build in 1 minutes
[cc]May-13 15:53:59 Project       - Project mine:  waiting for next time to build
[cc]May-13 15:53:59 jectController- mine Controller: build progress event: waiting for next time to build

Tortoise:TortoiseSVN 1.6.8,Build 19260 - 32 Bit,2010 /04/16 20:20:11
巡航控制:2.8.3

In my current CruiseControl setup I am running the following target:

<modificationset quietperiod="30">
       <svn RepositoryLocation="http://my/url/repo/trunk" />
</modificationset>

I do a simple checkin of a blank text file and subsequently the messages I receive in the CruiseControl log are as follows:

[cc]May-13 15:53:56 Project       - Project mine:  bootstrapping
[cc]May-13 15:53:56 jectController- mine Controller: build progress event: bootstrapping
[cc]May-13 15:53:56 Project       - Project mine:  checking for modifications
[cc]May-13 15:53:56 jectController- mine Controller: build progress event: checking for modifications
[cc]May-13 15:53:59 Project       - Project mine:  No modifications found, build not necessary.
[cc]May-13 15:53:59 Project       - Project mine:  idle
[cc]May-13 15:53:59 jectController- connectfour Controller: build progress event: idle
[cc]May-13 15:53:59 Project       - Project mine:  next build in 1 minutes
[cc]May-13 15:53:59 Project       - Project mine:  waiting for next time to build
[cc]May-13 15:53:59 jectController- mine Controller: build progress event: waiting for next time to build

Tortoise: TortoiseSVN 1.6.8, Build 19260 - 32 Bit , 2010/04/16 20:20:11
CruiseControl: 2.8.3

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

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

发布评论

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

评论(3

别理我 2024-09-08 19:54:36

也许您需要本地检出的存储库版本,以便 CruiseControl 可以进行比较,以便它可以检测更改?

我们在 CruiseControl 设置中执行此操作的方式:

我们有一个初始检查例程,用于检查构建所需的所有项目。我们使用脚本/批处理文件来执行此操作,它直接从命令行对 svn 进行操作。

然后我们在 CruiseControl 设置文件中使用以下内容:

<modificationset quietperiod="60">        
  <svn username="${svn.user}" 
       password="${svn.password}" 
       localWorkingCopy="${dir.checkout}/db4oj" />
</modificationset>

对于我们检查的每个项目,我们在修改集中都有一个像上面这样的 svn 条目。

dir.checkout 属性将指向文件系统中的具体路径。

Maybe you need a locally checked out version of the repository so CruiseControl has something to compare to, so it can detect changes?

The way we do this in our CruiseControl setup:

We have an initial checkout routine that checks out all the required projects for the build. We use a script/batch file to do this, which operates directly against svn from the command line.

Then we use the following in our CruiseControl setup file:

<modificationset quietperiod="60">        
  <svn username="${svn.user}" 
       password="${svn.password}" 
       localWorkingCopy="${dir.checkout}/db4oj" />
</modificationset>

For every project that we check out we have one svn entry like the above in the modificationset.

The dir.checkout property will point to a concrete path in the file system.

苦笑流年记忆 2024-09-08 19:54:36

我没有完整的答案,但您可以尝试以下操作:

  1. 打开 CruiseControl 的调试输出,它将打印出 CruiseControl 引擎发出的实际命令。
  2. 然后您将能够手动重新运行命令并检查它们的输出。

编辑:

添加简单的 log4j 配置:

log4j.logger.net.sourceforge.cruisecontrol.sourcecontrols=DEBUG

导致没有那么多消息添加到 CruiseControl 日志中。但足以了解执行什么 svn 命令。在我的日志中我看到:

2010-05-17 20:57:16,808 [BuildQueueThread] INFO  BuildQueue    - now adding to the thread queue: test1
2010-05-17 20:57:16,821 [Thread-22] INFO  Project       - Project test1:  bootstrapping
2010-05-17 20:57:16,821 [Thread-22] INFO  jectController- test1 Controller: build progress event: bootstrapping
2010-05-17 20:57:16,821 [Thread-22] INFO  Project       - Project test1:  checking for modifications
2010-05-17 20:57:16,821 [Thread-22] INFO  jectController- test1 Controller: build progress event: checking for modifications
2010-05-17 20:57:16,828 [Thread-22] DEBUG SVN           - Executing command: svn log --non-interactive --xml -v -r {2010-05-16T22:00:00Z}:{2010-05-17T18:57:16Z} http://localhost/svn/SomeProject/

现在,如果我手动发出相同的命令,我会得到“空”XML:

$  svn log --non-interactive --xml -v -r {2010-05-16T22:00:00Z}:{2010-05-17T18:57:16Z} http://localhost/svn/SomeProject/
<?xml version="1.0"?>
<log>
</log>

...而不是更广泛的时间范围,例如:

$  svn log --non-interactive --xml -v -r {2001-01-01T01:00:00Z}:{2010-05-17T18:57:16Z} http://localhost/svn/SomeProject/
[...]

I don't have a full answer, but this is what you can try:

  1. Turn on debug output from CruiseControl, it will print out actual commands issued by CruiseControl engine.
  2. Then you will be able to re-run the commands manually and check what's their output.

EDIT:

Adding simple log4j configuration:

log4j.logger.net.sourceforge.cruisecontrol.sourcecontrols=DEBUG

results in not so many message added to the CruiseControl log. Yet enough to learn what svn command is executed. In my logs I saw:

2010-05-17 20:57:16,808 [BuildQueueThread] INFO  BuildQueue    - now adding to the thread queue: test1
2010-05-17 20:57:16,821 [Thread-22] INFO  Project       - Project test1:  bootstrapping
2010-05-17 20:57:16,821 [Thread-22] INFO  jectController- test1 Controller: build progress event: bootstrapping
2010-05-17 20:57:16,821 [Thread-22] INFO  Project       - Project test1:  checking for modifications
2010-05-17 20:57:16,821 [Thread-22] INFO  jectController- test1 Controller: build progress event: checking for modifications
2010-05-17 20:57:16,828 [Thread-22] DEBUG SVN           - Executing command: svn log --non-interactive --xml -v -r {2010-05-16T22:00:00Z}:{2010-05-17T18:57:16Z} http://localhost/svn/SomeProject/

Now, if I issued the same command manually, I get 'empty' XML:

$  svn log --non-interactive --xml -v -r {2010-05-16T22:00:00Z}:{2010-05-17T18:57:16Z} http://localhost/svn/SomeProject/
<?xml version="1.0"?>
<log>
</log>

... as opposed to broader time range, e.g.:

$  svn log --non-interactive --xml -v -r {2001-01-01T01:00:00Z}:{2010-05-17T18:57:16Z} http://localhost/svn/SomeProject/
[...]
要走干脆点 2024-09-08 19:54:36

只是为了给您另一个数据点,我用我的(相当旧的)CruiseControl 设置尝试了这一点,并且它有效。

  • CruiseControl v2.5
  • Subversion 服务器 v1.5.5 (r34862)
  • Apache 2.0

我使用的是 svn:// url,所以我更改为 http url 以匹配您的测试,然后重新启动巡航控制。等了一段时间(我分心了一个小时)然后在 svn 中提交了我的一个文件的更改。不久之后,由 svn 中的修改触发的新构建开始了。

编辑:澄清一下,我的巡航控制正在监视 svn,例如 svn://buildserver/svnrepo/project 。您的 OP 提到使用 http URL。为了更接近您的测试场景,我还想使用 http url。我通过 apache 映射了 svn,所以我只是更改了 apache 提供 svn 存储库的 URL,例如 http://devserver/svn/svnrepo/project 来更接近您的测试场景。

我的观点是要表明你正在尝试做的事情确实有效。

这是我的 CruiseControl config.xml 文件中经过清理的代码片段。我正在使用maven(1.1beta3!)来构建。 Crikey,这个东西很旧,但是很有效。

<project buildafterfailed="false" name="someproject-int">
        <plugin name="svn" classname="net.sourceforge.cruisecontrol.sourcecontrols.SVN">
        </plugin>
        <plugin name="svnbootstrapper" classname="net.sourceforge.cruisecontrol.bootstrappers.SVNBootstrapper">
        </plugin>    
    <labelincrementer separator="_" defaultLabel="rev_1"/>
    <bootstrappers>
      <currentbuildstatusbootstrapper file="p:/build/cc-logs/someproject-int/status.txt">
      </currentbuildstatusbootstrapper>
    </bootstrappers>
    <modificationset>
      <svn repositoryLocation="http://dev/svn/project/trunk" 
      localWorkingCopy="p:/build/checkout/int/project"
      username="build" password="****">
      </svn>      
    </modificationset>
    <schedule interval="300">
      <maven goal="scm:svn-update-project|compile" 
        projectfile="p:/build/checkout/int/project/project.xml" 
        mavenscript="d:/Programs/build/Maven-1.1b3/bin/maven.bat">
      </maven>
    </schedule>
    <log dir="p:/build/cc-logs/project" encoding="ISO-8859-1">
    </log>
    <publishers>
    [...]
    </publishers>
  </project>

Just to give you another datapoint, I tried this with my (rather old) CruiseControl setup, and it worked.

  • CruiseControl v2.5
  • Subversion server v1.5.5 (r34862)
  • Apache 2.0

I was using a svn:// url so I changed to a http url to match your test, restarted cruise control. Waited for a while (I got distracted for an hour) then commited a change in one of my files in svn. Shortly after, a new build started, triggered by the modification in svn.

EDIT: To clarify, my cruise control was monitoring svn at something like svn://buildserver/svnrepo/project. Your OP mentions using a http URL. To get closer to your test scenario, I wanted also to use a http url. I had svn mapped through apache, so I just changed the URL that I was using to where apache was presenting the svn repo, e.g. http://devserver/svn/svnrepo/project to get closer to your test scenario.

My point is to show that what you are trying to do does work.

Here's a sanitised snippet from my CruiseControl config.xml file. I'm using maven (1.1beta3 !) to build. Crikey, this stuff is old, but it's working.

<project buildafterfailed="false" name="someproject-int">
        <plugin name="svn" classname="net.sourceforge.cruisecontrol.sourcecontrols.SVN">
        </plugin>
        <plugin name="svnbootstrapper" classname="net.sourceforge.cruisecontrol.bootstrappers.SVNBootstrapper">
        </plugin>    
    <labelincrementer separator="_" defaultLabel="rev_1"/>
    <bootstrappers>
      <currentbuildstatusbootstrapper file="p:/build/cc-logs/someproject-int/status.txt">
      </currentbuildstatusbootstrapper>
    </bootstrappers>
    <modificationset>
      <svn repositoryLocation="http://dev/svn/project/trunk" 
      localWorkingCopy="p:/build/checkout/int/project"
      username="build" password="****">
      </svn>      
    </modificationset>
    <schedule interval="300">
      <maven goal="scm:svn-update-project|compile" 
        projectfile="p:/build/checkout/int/project/project.xml" 
        mavenscript="d:/Programs/build/Maven-1.1b3/bin/maven.bat">
      </maven>
    </schedule>
    <log dir="p:/build/cc-logs/project" encoding="ISO-8859-1">
    </log>
    <publishers>
    [...]
    </publishers>
  </project>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文