巡航控制.NET perforce所有提交都是修改

时间:2014-01-24 22:34:01

标签: perforce cruisecontrol.net

我有一个巡航控制服务器正在运行并成功构建我的项目。但是,我的间隔触发器(设置为IfModificationExists)在每次尝试构建时都将数据库历史记录中的整个更改列表注册为修改,因此无论是否有新的提交,都会在每个间隔上构建。有什么建议?以下是我的配置文件的相关位:

<cruisecontrol>

<project name="MyProj">
<artifactDirectory>C:\CCNet\Artifacts\</artifactDirectory>

<!-- TRIGGER THE CHECK TO BUILD EVERY HOUR -->
<triggers>
  <!-- check the source control every X time for changes, 
     and run the tasks if changes are found -->
  <intervalTrigger
           name="continuous"
           seconds="3600"
           buildCondition="IfModificationExists"
           initialSeconds="5"/>
</triggers>
<workingDirectory>C:\PerforceFiles\</workingDirectory>

<!-- CHECK FOR CHANGES IN PERFORCE, EXCLUDE .CHM FILES SINCE THEY ARE CHECKED IN AS PART OF THIS BUILD -->
<sourcecontrol type="filtered">
  <sourceControlProvider type="p4">
    <view>//depot/Folder1/... //cruisecontrol_server/Folder1/..., //depot/Folder2/... //cruisecontrol_server/Folder2/..., //depot/Folder3/... //cruisecontrol_server/Folder3/..., //depot/Folder4/... //cruisecontrol_server/Folder4/...</view>
    <executable>C:\Program Files\Perforce\p4.exe</executable>
    <workingDirectory>C:\PerforceFiles</workingDirectory>
    <client>cruisecontrol_server</client> <!-- this workspace's tree is equivalent to the view listed above -->
    <user>cruisecontrol</user>
    <port>myPort</port>
    <applyLabel>false</applyLabel>
    <autoGetSource>true</autoGetSource>
    <forceSync>false</forceSync>
  </sourceControlProvider>
  <exclusionFilters>
    <pathFilter>
      <pattern>/**/*.chm</pattern>
    </pathFilter>
  </exclusionFilters>
</sourcecontrol>

文件的其余部分只是我的任务和发布者,我认为这不是相关的。如果您需要更多信息,请告诉我,我会尽快回复。

1 个答案:

答案 0 :(得分:0)

对我而言,这是我正在使用 SVN 的过滤块并正常运行:

  <sourcecontrol type="filtered">
      <sourceControlProvider type="svn">
          <executable>$(svnConsole)</executable>
          <username>username</username>
          <password>password</password>
          <autoGetSource>true</autoGetSource> 
          <trunkUrl>https://trunkurl</trunkUrl>
          <workingDirectory>$(DevelopmentDir)\</workingDirectory>
      </sourceControlProvider>
      <exclusionFilters>
          <pathFilter>
              <pattern>**/AssemblyInfo.cs</pattern>
          </pathFilter>
     </exclusionFilters>
</sourcecontrol>

排除主干上的每个 AssemblyInfo.cs 文件。 希望这有帮助!