From: Adam B. <ab...@aw...> - 2014-05-27 15:54:48
|
The propertyfilelabelincrementer tag is local to each cc project. The props.file is global. You can put multiple values in it so we use one for all our builds. -Adam Adam Bruss Senior Development Engineer AWR Corporation 1017 W. Glen Oaks Lane Suite 106 Mequon, WI 53092 P: 1.262.241.2384 E: ab...@aw...<http://meqtestprfrm-dt:8080/cruisecontrol/buildresults/ab...@aw...> W: http://www.awrcorp.com<http://www.awrcorp.com/> From: Adam Bruss [mailto:ab...@aw...] Sent: Tuesday, May 27, 2014 10:45 AM To: cru...@li... Subject: Re: [Cruisecontrol-user] Build properties through <property file> Hi David, Yes it reads it on each build. The files looks like this: # Cruisecontrol reads this file to set its build label projectprop= The ant bootstrapper sets the value in here. Here is how we set the property value, projectprop, in the antbootstrapper: <propertyfile file="c:\temp\props.file"> <entry key="projectprop" value="[${my_build_number}]"/> </propertyfile> my_build_number comes from an xml file our build system writes to our test machine after each full build. Gotta get the current build number from somewhere. -Adam Adam Bruss Senior Development Engineer AWR Corporation 1017 W. Glen Oaks Lane Suite 106 Mequon, WI 53092 P: 1.262.241.2384 E: ab...@aw...<http://meqtestprfrm-dt:8080/cruisecontrol/buildresults/ab...@aw...> W: http://www.awrcorp.com<http://www.awrcorp.com/> From: David Peter Bradly [mailto:DB...@sl...] Sent: Tuesday, May 27, 2014 10:36 AM To: cru...@li...<mailto:cru...@li...> Subject: Re: [Cruisecontrol-user] Build properties through <property file> Adam, So, when the project is run, it reads the CURRENT contents of c:\temp\props.file to get a build number property? What is the format of your props.file? Is your <property file> tag global or in the project section? David Bradly Abingdon Pipesim Team Tel: (+44) 1235 857855 From: Adam Bruss [mailto:ab...@aw...] Sent: 27 May 2014 14:12 To: cru...@li...<mailto:cru...@li...> Subject: Re: [Cruisecontrol-user] Build properties through <property file> What we do is use <propertyfilelabelincrementer defaultlabel="build.1" propertyfile="c:\temp\props.file" propertyname="projectprop" preBuildIncrementer="true"/> Then we do an antbootstrapper which edits c:\temp\props.file putting in the current build number. -Adam Adam Bruss Senior Development Engineer AWR Corporation 1017 W. Glen Oaks Lane Suite 106 Mequon, WI 53092 P: 1.262.241.2384 E: ab...@aw...<http://meqtestprfrm-dt:8080/cruisecontrol/buildresults/ab...@aw...> W: http://www.awrcorp.com<http://www.awrcorp.com/> From: David Peter Bradly [mailto:DB...@sl...] Sent: Tuesday, May 27, 2014 6:19 AM To: cru...@li...<mailto:cru...@li...> Subject: [Cruisecontrol-user] Build properties through <property file> I am trying to set up 'flexible' build properties for a Linux Cruise Control Project. The example being the verification or a particular previous build, where I need to set the build number at run time. In Cruise Control.NET it is possible to define interactive build properties through <text parameter>. I am happy for the parameters to be defined in a file and I have investigated <property file> for this purpose. <project name="Linux-Validation" forceOnly="true"> <!-- Get build properties for validation project from file - used only in forced build --> <property file="/linuxvalidation/build.properties"/> However, it appears that the property file is only read once when the cruise control process is started or restarted, but not when the project is run, either scheduled or forced. Is this the expected behavior and if so, what other method could I use to set build properties for a particular run? Thanks, David Bradly |