Accessing the "buildforced" value in bootstrappers?

Nhat Tran <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Hi all,


Does anyone know of a way to access the "buildforced" value from a 
bootstrapper?  This value is passed to the builder by Cruise Control, 
but I would like it to be available to the bootstrapper as well.


I have the following setup for CruiseControl (v2.7.1):
* Machine A:
- Builds and distributes the installation package for the product to our 
'storage' server:
   a) Whenever there's an update to the repository
   b) Periodically every night (this run also creates a 'trigger' file)

* Machine B:
- Monitors the 'storage' server for the 'trigger' file
- If present, deletes it, then:
   - Retrieve the installation package.
   - Install the product.
   - Run the regression tests.

The checking step is currently being done via an antbootstrapper, which 
calls the "check-trigger" target below:

   <target name="check-trigger">
     <condition property="forced.run">
       <istrue value="${buildforced}"/>
     </condition>

     <antcall target="check-trigger-unix"/>
     <antcall target="check-trigger-windows"/>
   </target>

   <target name="check-trigger-unix" if="is.unix" unless="forced.run">
     <exec executable="scp" failonerror="true">
       <arg 
value="${repository.server}:${repository.path}/${product.name}/builds/${release.tag}/cc.trigger.file"/>
       <arg value="/tmp/cc.trigger.file"/>
     </exec>

     <delete file="/tmp/cc.trigger.file"/>
     <exec executable="ssh" failonerror="true">
       <arg value="${repository.server}"/>
       <arg value="rm 
${repository.path}/${product.name}/builds/${release.tag}/cc.trigger.file"/>
     </exec>
   </target>


I have a separate one for the Windows machines, which it basically does 
the same thing as the Unix target above.


The main problem is that there's no way to manually run the regression, 
since the "buildforced" value is currently not available to the 
bootstrapper - so the checking target still gets called and obviously it 
will fail and aborts the run.  Moving the check step into the builder 
works, but it'll result in "failed" builds whenever the trigger file is 
not there, which I do not want.


Any assistance you can provide is greatly appreciated. Thank you for 
your time.


Regards,
Nhat Tran


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.