The fork process with CC.NET

Is there a way to deploy a process inside Cruise Control.NET? I want CC.NET to run the program when everything has been done, but right now, CC.NET is insisting on waiting for the program to close before saying that the build is complete.

The launch of the program should be carried out within a few weeks.

+5
source share
4 answers

How can I do this is to use PowerShell or Batch script. The script can start your process and go back to CC.NET after spawning the executable. This is the only way to see this, since CC.NET needs to know that it is back, and the script can come back, even with the process you spawned, it still works there. An example PowerShell script that will do what you want. Then you just call the powershell script from the path to exe as a paratetra.

    param(  [string] $exePath = $(throw "A path to executable required.")
    )

Invoke-Item $exePath

here on CC.NET 1.5, it will show how to configure the powershell task

<powershell> 
    <script>yourScriptName.ps1</script> 
    <scriptsDirectory>D:\CruiseControl</scriptsDirectory> 
    <buildArgs>full path to exe you want to kick-off</buildArgs>     
</powershell>
+5
source

How about this ... 2 Small Programs

1) A process that runs all the time (maybe a Windows service?) And listens on the tcp socket when it receives a connection, runs your three-week process.

2) , CC.NET, tcp- # 1, .

, TCP .

+2

CCNET ForceBuildPublisher .

<project name="OriginalProject">
  <!-- ... -->
  <publishers>
    <!-- ... -->
    <forcebuild>
      <project>LaunchProgram</project>
   </forcebuild>
  </publishers>
</project>
+1

powershell ( ), ruby ​​rake , ruby, CruiseControl STILL INSIST, .

For me; The only way to successfully launch an independent daemon process / server application with CCNET is to use the task scheduler ( fooobar.com/questions/8654 / ... )

therefore, use the schtasks.exe file to create a one-time run after the task starts.

you can call schtasks and set the dynamic run time using a batch file, ruby ​​rake or powershell.

0
source

All Articles