Multiple projects in CruiseControl.NET in the same queue running simultaneously

I have several projects in CruiseControl.NET (version 1.4.4) that I assigned to a single queue ...

   <project name="Build - A" queue="Q1">
   ...
   </project>
   <project name="Build - B" queue="Q1">
   ...
   </project>
   <project name="Build - C" queue="Q1">
   ...
   </project>
   <project name="Build - D" queue="Q1">
   ...
   </project>

All projects are non-launching projects. I (along with all the other developers in the division) use CCTray to start each project manually. The problem is this: if, while Project A is running, another user uses Force Build to start another project, he works simultaneously with Project A. Even if they are on the same queue. I would think that there will be requests in one queue ... I don’t know, I put it in the queue and did not execute it at the same time. I use the default implementation of the queue "UseFirst".

, , ? , , , .

+3
2

. , , . ccnet.

( ) ccnet ( preprocessor):

<cruisecontrol
    xmlns:cb="urn:ccnet.config.builder" xmlns="http://thoughtworks.org/ccnet/1/5">

  <!-- Queue to make sure one build at a time - to avoid same folder SVN locking issues-->
  <queue name="Q_Synchronizer" duplicates="UseFirst" />

  <!-- ************ Common defs (CC.net pre-processor tags)*********-->
  <cb:define local_svn_root="C:\svn"/>
  <cb:define remote_svn_root="http://SVN_SERVER:8888/svn/"/>
  <cb:define svn_exe="C:\Program Files\Subversion\bin\svn.exe"/>
  <cb:define svn_user="SVNUSER" svn_pw="PPPPPWWWW"/>
  <cb:define server_url="http://CCNET_SERVER/ccnet"/>
  <cb:define build_timeout="900"/>

  <cb:define name="msbuild_task">
    <msbuild>
      <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
      <workingDirectory>$(local_svn_root)$(project_solution_path)</workingDirectory>
      <projectFile>$(project_solution_file)</projectFile>
      <buildArgs>/p:Configuration=$(project_solution_configuration) /p:VCBuildAdditionalOptions="/useenv" /v:diag /t:rebuild</buildArgs>
      <timeout>$(build_timeout)</timeout>
    </msbuild>
  </cb:define>

  <cb:define name="svn_dependency">
    <svn>
      <executable>$(svn_exe)</executable>
      <workingDirectory>$(local_svn_root)$(internal_svn_path)</workingDirectory>
      <trunkUrl>$(remote_svn_root)$(internal_svn_path)</trunkUrl>
      <username>$(svn_user)</username>
      <password>$(svn_pw)</password>
      <timeout units="minutes">30</timeout>
    </svn>

  </cb:define>

   <cb:define name="project_template" >
    <project name="$(project_name)" queue="Q_Synchronizer" queuePriority="$(queuePriority)">
      <workingDirectory>$(local_svn_root)$(project_solution_path)</workingDirectory>
      <webURL>$(server_url)/server/local/project/$(project_name)/ViewLatestBuildReport.aspx</webURL>
      <triggers>
        <intervalTrigger seconds="30" name="continuous" buildCondition="IfModificationExists"/>
      </triggers>
      <sourcecontrol type="multi">
        <sourceControls>
          <cb:svn_dependency internal_svn_path="$(project_internal_svn_path)"/>

          <cb:additional_svn_dependencies/>

        </sourceControls>
      </sourcecontrol>
      <tasks>
        <cb:msbuild_tasks/>
      </tasks>
      <publishers>
        <xmllogger logDir="$(local_svn_root)$(project_solution_path)\BuildLogs" />        
      </publishers>
    </project>
  </cb:define>

   <!-- ************* Projects definition ************-->
  <cb:project_template
     project_name="Proj A"
     project_internal_svn_path="/code/"
     project_solution_path="/code/Proj A"
     project_solution_file="Proj A.sln"
     queuePriority="1"
     >
    <cb:define name="msbuild_tasks">
      <cb:msbuild_task project_solution_configuration="Debug"/>
      <cb:msbuild_task project_solution_configuration="Release"/>
    </cb:define>
    <cb:define name="additional_svn_dependencies">
      <cb:svn_dependency internal_svn_path="/bin"/>
    </cb:define>

  </cb:project_template>

  <cb:project_template
     project_name="Proj B"
     project_internal_svn_path="/code/"
     project_solution_path="/code/Proj B"
     project_solution_file="Proj B.sln"
     queuePriority="1"
     >
    <cb:define name="msbuild_tasks">
      <cb:msbuild_task project_solution_configuration="Debug"/>
      <cb:msbuild_task project_solution_configuration="Release"/>
    </cb:define>
    <cb:define name="additional_svn_dependencies">
      <cb:svn_dependency internal_svn_path="/third-party"/>
    </cb:define>
  </cb:project_template>


</cruisecontrol>
+4

, lockqueues (. )

0

Source: https://habr.com/ru/post/1790482/


All Articles