开发者

execute task before source block cruisecontrol.net 1.5

I'm trying to execute a program before th开发者_JAVA技巧e source control block executes and downloads the source to my local working directory. the prebuild task executes after and the tasks block executes after. I've poured over the docs and just can't figure it out.

I eventually wrote an executable that ran before the code retrieval. Even then it was fragile. So, I switched to Automated QA.


As far as I know that is not an option. The purpose of continuous integration is to get latest code and then perform the build. If you are needing to do some type of cleanup (file deletion perhaps) you should do that at the end of the build. This way it will already be in the desired state before the next build is kicked off.


I tried the following simple command in prebuild. Cannot see it being fired before source block.

<prebuild>
<exec>  
  <executable>cmd</executable>
  <buildArgs>"/c MD C:\build\1.4"</buildArgs>
</exec>
..
</prebuild>


Prebuild DOES fire before the source control get. It comes after the source control block but still fires first. Here's an example I've been using:

<cb:define subversionpath="c:\Program Files\Subversion\bin\svn.exe"
/>

 <cb:define name="svn50">
<executable>$(subversionpath)</executable>
<workingDirectory>D:\Projects\B50\Source</workingDirectory>
<trunkUrl>svn://machineName/branches/B_50/Source</trunkUrl>
<autoGetSource>true</autoGetSource>
</cb:define>

 <project name="StreamlineCheckBuild" queue="B50">
<triggers>
  <intervalTrigger seconds="180" />
</triggers>
<sourcecontrol type="svn">
  <cb:svn50/>
  <deleteObstructions>true</deleteObstructions>
  <forceUpdate>true</forceUpdate>
</sourcecontrol>
<prebuild>
  <exec>
    <executable>$(subversionpath)</executable>
    <buildArgs>cleanup</buildArgs>
    <baseDirectory>D:\Projects\B50</baseDirectory>
  </exec>
</prebuild>
<tasks>
...
</tasks>
</cruisecontrol>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜