common/build.xml
changeset 207 6d9dd19b6949
parent 168 bf91a7e3c25b
parent 206 62976b2583f7
child 212 216378ca9c25
child 213 6e86ffca2e31
equal deleted inserted replaced
168:bf91a7e3c25b 207:6d9dd19b6949
    19     <property name="network.free.space" value="${sf.spec.publish.network.freespace}"/>
    19     <property name="network.free.space" value="${sf.spec.publish.network.freespace}"/>
    20     <property name="network.drive" value="${sf.spec.publish.networkdrive}"/>
    20     <property name="network.drive" value="${sf.spec.publish.networkdrive}"/>
    21     <property name="prep.root.dir" value="${sf.spec.job.rootdir}"/>
    21     <property name="prep.root.dir" value="${sf.spec.job.rootdir}"/>
    22     <property name="publish" value="${sf.spec.publish.enable}"/>
    22     <property name="publish" value="${sf.spec.publish.enable}"/>
    23     <property name="publish.root.dir" value="${sf.spec.publish.rootdir}"/>
    23     <property name="publish.root.dir" value="${sf.spec.publish.rootdir}"/>
       
    24     <property name="diamonds.host" value="${sf.spec.publish.diamonds.server}"/>
       
    25     <property name="diamonds.port" value="${sf.spec.publish.diamonds.port}"/>
       
    26     <property name="diamonds.path" value="${sf.spec.publish.diamonds.path}"/>
    24     <property name="build.system" value="${sf.spec.build.system}"/>
    27     <property name="build.system" value="${sf.spec.build.system}"/>
    25     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
    28     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
    26     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    29     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    27 	
    30 	
    28 	
    31     <!-- SF-specific Helium properties not meant to be exposed in the project spec -->
       
    32     <property name="diamonds.listener.configuration.file" location="${sf.common.config.dir}/diamonds/config.xml.ftl"/>
       
    33     
    29     <!-- import all core HELIUM targets -->
    34     <!-- import all core HELIUM targets -->
    30     <import file="${helium.dir}/helium.ant.xml" />
    35     <import file="${helium.dir}/helium.ant.xml" />
    31     
    36     
    32     <!-- import common references -->
    37     <!-- import common references -->
    33     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    38     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
   174     </target>
   179     </target>
   175 
   180 
   176     <target name="sf-prebuild">
   181     <target name="sf-prebuild">
   177         <echo>[SF-PREBUILD]</echo>
   182         <echo>[SF-PREBUILD]</echo>
   178         
   183         
       
   184         <if>
       
   185             <istrue value="${sf.spec.publish.enable}"/>
       
   186             <then>
       
   187                 <runtarget target="diamonds"/>
       
   188             </then>
       
   189         </if>
       
   190         
   179         <!-- create BOM dir -->
   191         <!-- create BOM dir -->
   180         <mkdir dir="${build.drive}/output/logs/BOM"/>
   192         <mkdir dir="${build.drive}/output/logs/BOM"/>
   181         
   193         
   182         <!-- record project and config information in BOM files -->
   194         <!-- record project and config information in BOM files -->
   183         <delete file="${build.drive}/output/logs/BOM/config.csv" quiet="true"/>
   195         <delete file="${build.drive}/output/logs/BOM/config.csv" quiet="true"/>
   243                     <arg value="/c"/>
   255                     <arg value="/c"/>
   244                     <arg value="echo"/>
   256                     <arg value="echo"/>
   245                     <arg value="${sf.spec.baseline.location}"/>
   257                     <arg value="${sf.spec.baseline.location}"/>
   246                 </exec>
   258                 </exec>
   247                 
   259                 
   248                 <!-- run interal target preparation-getenv -->
   260                 <!-- run internal target preparation-getenv -->
   249                 <runtarget target="preparation-getenv"/>
   261                 <runtarget target="preparation-getenv"/>
   250                 
   262                 
   251             </then>
   263             </then>
   252             <else>
   264             <else>
   253                 <!-- record fact that no baseline used. required by diamondize-bom  -->
   265                 <!-- record fact that no baseline used. required by diamondize-bom  -->
   467         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
   479         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
   468     </target>
   480     </target>
   469     
   481     
   470     <target name="sf-diamondize-bom">
   482     <target name="sf-diamondize-bom">
   471         <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   483         <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
   472               outputFile="${build.drive}/output/logs/BOM/build-info.xml">
   484               outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
   473             <data expandProperties="yes">
   485             <data expandProperties="yes">
   474                 ant: antProperties()
   486                 ant: antProperties()
   475                 config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
   487                 config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
   476                 project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
   488                 project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
   477                 baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
   489                 baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
   707           <exclude name="*build_check_compile.log"/>
   719           <exclude name="*build_check_compile.log"/>
   708         </fileset>
   720         </fileset>
   709       </path>
   721       </path>
   710       <sequential>
   722       <sequential>
   711         <propertyregex override="yes" property="yarpfile"  input="@{logfile}" regexp=".*[\\|\/](.*)_compile\.log" replace="\1_yarp.csv"/>
   723         <propertyregex override="yes" property="yarpfile"  input="@{logfile}" regexp=".*[\\|\/](.*)_compile\.log" replace="\1_yarp.csv"/>
       
   724         <propertyregex override="yes" property="yarpfile_short"  input="${yarpfile}" regexp="[^_]*_[^_]*_[^_]*_(.+)_[^_]*_yarp\.csv" replace="YARP_\1"/>
   712         <echo message="Yarping @{logfile}..."/>
   725         <echo message="Yarping @{logfile}..."/>
   713         <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_yarp.log" append="true">
   726         <exec executable="perl" dir="${build.drive}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_yarp.log" append="true">
   714           <arg value="${sf.common.config.dir}/tools/analysis/yarp.pl"/>
   727           <arg value="${sf.common.config.dir}/tools/analysis/yarp.pl"/>
   715           <arg value="@{logfile}"/>
   728           <arg value="@{logfile}"/>
   716           <arg value="${build.log.dir}/analysis/${yarpfile}"/>
   729           <arg value="${build.log.dir}/analysis/${yarpfile}"/>
   717         </exec>
   730         </exec>
       
   731         <exec executable="cmd" output="${build.drive}/output/logs/analysis/tmp_yarp_files.csv" append="true">
       
   732           <arg value="/c"/>
       
   733           <arg value="echo"/>
       
   734           <arg value="${yarpfile_short},${sf.spec.publish.networkdrive}\${sf.spec.job.name}\builds\${sf.spec.job.codeline}\${build.id}\logs\analysis\${yarpfile},${build.drive}\output\logs\analysis\${yarpfile}"/>
       
   735         </exec>
   718       </sequential>
   736       </sequential>
   719     </for>
   737     </for>
       
   738     
       
   739     <exec executable="perl" dir="${build.drive}" failonerror="false" outputproperty="sf.job.totalyarperrors">
       
   740       <arg value="${sf.common.config.dir}/tools/analysis/parse_yarp_files.pl"/>
       
   741       <arg value="${build.drive}/output/logs/analysis/tmp_yarp_files.csv"/>
       
   742     </exec>
       
   743     <echo message="Total yarp errors: ${sf.job.totalyarperrors}"/>
       
   744     
       
   745     <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis.xml">
       
   746       <data expandProperties="yes">
       
   747         ant: antProperties()
       
   748         files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
       
   749       </data>
       
   750     </fmpp>
   720 
   751 
   721     </target>
   752     </target>
   722   
   753   
   723     <target name="sf-run-evalid">
   754     <target name="sf-run-evalid">
   724         <delete dir="${build.drive}/output/md5"/>
   755         <delete dir="${build.drive}/output/md5"/>