common/build.xml
changeset 1110 4b2c741f781a
parent 1109 cae69bccf0cc
child 1113 488afbbbaebd
equal deleted inserted replaced
1109:cae69bccf0cc 1110:4b2c741f781a
    90     <!-- Import common references -->
    90     <!-- Import common references -->
    91     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    91     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    92              
    92              
    93     <!-- Import functionality distributed into other file(s) -->
    93     <!-- Import functionality distributed into other file(s) -->
    94     <import file="${sf.common.config.dir}/build.postbuild.xml"/>
    94     <import file="${sf.common.config.dir}/build.postbuild.xml"/>
    95 	
    95     
    96     <!-- Import test functionality distributed into other file(s) -->
    96     <!-- Import test functionality distributed into other file(s) -->
    97     <import file="${sf.common.config.dir}/build.test.xml"/>
    97     <import file="${sf.common.config.dir}/build.test.xml"/>
    98     
    98     
    99     <!-- helium 7+ compatability. needs to be defined -->
    99     <!-- helium 7+ compatability. needs to be defined -->
   100     <if>
   100     <if>
   131       - END OF PROPERTY DEFINITIONS, TARGETS START HERE
   131       - END OF PROPERTY DEFINITIONS, TARGETS START HERE
   132       -->
   132       -->
   133     
   133     
   134     <target name="sf-prep" depends="sf-prep-announce,prep-drive,init-build-area,create-bom,log-build-env,sf-get-utils">
   134     <target name="sf-prep" depends="sf-prep-announce,prep-drive,init-build-area,create-bom,log-build-env,sf-get-utils">
   135         <!-- Test for the disk space we would like for this build -->
   135         <!-- Test for the disk space we would like for this build -->
   136 	<fail>
   136         <fail>
   137             <condition>
   137             <condition>
   138                 <not>
   138                 <not>
   139                     <or>
   139                     <or>
   140                         <isset property="sf.suppress.drive.space.check"/>
   140                         <isset property="sf.suppress.drive.space.check"/>
   141                         <hasfreespace partition="${build.drive}" needed="${sf.drive.space.needed}"/>
   141                         <hasfreespace partition="${build.drive}" needed="${sf.drive.space.needed}"/>
   181       </if>
   181       </if>
   182       <echo message="Translate \output\logs\envinfo.txt into a Diamonds file"/>
   182       <echo message="Translate \output\logs\envinfo.txt into a Diamonds file"/>
   183       <exec executable="perl" dir="${build.drive}">
   183       <exec executable="perl" dir="${build.drive}">
   184           <arg value="${sf.common.config.dir}/tools/envinfo2diamonds.pl"/>
   184           <arg value="${sf.common.config.dir}/tools/envinfo2diamonds.pl"/>
   185       </exec>
   185       </exec>
   186     	
   186         
   187         <!-- Conditional location of BuildEnv.xml. Project always preferred to default -->
   187         <!-- Conditional location of BuildEnv.xml. Project always preferred to default -->
   188         <if><available file="${sf.project.location}/BuildEnv.xml"/>        
   188         <if><available file="${sf.project.location}/BuildEnv.xml"/>        
   189             <then>
   189             <then>
   190                 <property name="sf.buildenv.location" value="${sf.project.location}"/>
   190                 <property name="sf.buildenv.location" value="${sf.project.location}"/>
   191             </then>
   191             </then>
   283         <istrue value="${sf.spec.publish.enable}"/>
   283         <istrue value="${sf.spec.publish.enable}"/>
   284         <then>
   284         <then>
   285           <echo>[SF-DIAMONDS-ENVINFO]</echo>
   285           <echo>[SF-DIAMONDS-ENVINFO]</echo>
   286           <echo message="Send ${build.log.dir}/diamonds_envinfo.xml to Diamonds"/>
   286           <echo message="Send ${build.log.dir}/diamonds_envinfo.xml to Diamonds"/>
   287           <exec executable="python">
   287           <exec executable="python">
   288 		    <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
   288             <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
   289 		    <arg value="-u"/>
   289             <arg value="-u"/>
   290 		    <arg value="http://${diamonds.host}${diamonds.build.id}"/>
   290             <arg value="http://${diamonds.host}${diamonds.build.id}"/>
   291 		    <arg value="-f"/>
   291             <arg value="-f"/>
   292 		    <arg value="${build.log.dir}/diamonds_envinfo.xml"/>
   292             <arg value="${build.log.dir}/diamonds_envinfo.xml"/>
   293 		  </exec>
   293           </exec>
   294         </then>
   294         </then>
   295       </if>
   295       </if>
   296     </target>
   296     </target>
   297 
   297 
   298     <target name="sf-diamonds-tag-build">
   298     <target name="sf-diamonds-tag-build">
   425                 <ant antfile="${temp.build.dir}/source-test-spec.ant.xml" />
   425                 <ant antfile="${temp.build.dir}/source-test-spec.ant.xml" />
   426                 <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_test.csv"/>
   426                 <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_test.csv"/>
   427             </then>
   427             </then>
   428         </if>
   428         </if>
   429 
   429 
   430         <ant antfile="${temp.build.dir}/source-rnd-spec.ant.xml" />
   430 
   431         <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_rnd.csv"/>
   431         <if><available file="${temp.build.dir}/source-rnd-spec.ant.xml"/>
   432 
   432           <then>
       
   433               <ant antfile="${temp.build.dir}/source-rnd-spec.ant.xml" />
       
   434               <move file="${build.drive}/output/logs/BOM/sources.csv" tofile="${build.drive}/output/logs/BOM/sources_rnd.csv"/>
       
   435           </then>
       
   436         </if>
       
   437         
   433         <ant antfile="${temp.build.dir}/source-spec.ant.xml" />
   438         <ant antfile="${temp.build.dir}/source-spec.ant.xml" />
   434         <stopwatch name="sf-get-source" action="elapsed"/>
   439         <stopwatch name="sf-get-source" action="elapsed"/>
   435     </target>
   440     </target>
   436     
   441     
   437     <target name="sf-generate-source-spec">
   442     <target name="sf-generate-source-spec">
   491                     data: [
   496                     data: [
   492                         csv(${sf.source.csv.file}, {separator:','})
   497                         csv(${sf.source.csv.file}, {separator:','})
   493                     ]
   498                     ]
   494               </data>
   499               </data>
   495         </fmpp>
   500         </fmpp>
   496 
   501 		
   497         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   502         <if><available file="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile.rnd}"/>
   498               outputFile="${temp.build.dir}/source-rnd-spec.ant.xml">
   503           <then>
   499               <data expandProperties="yes">
   504             <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   500                     ant: antProperties()
   505                   outputFile="${temp.build.dir}/source-rnd-spec.ant.xml">
   501                     data: [
   506                   <data expandProperties="yes">
   502                         csv(${sf.source_rnd.csv.file}, {separator:','})
   507                         ant: antProperties()
   503                     ]
   508                         data: [
   504               </data>
   509                             csv(${sf.source_rnd.csv.file}, {separator:','})
   505         </fmpp>
   510                         ]
   506 
   511                   </data>
       
   512             </fmpp>
       
   513           </then>
       
   514         </if>
   507         <if>
   515         <if>
   508             <istrue value="${sf.spec.smoketest.enable}"/>
   516             <istrue value="${sf.spec.smoketest.enable}"/>
   509             <then>
   517             <then>
   510             <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   518             <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   511                   outputFile="${temp.build.dir}/source-test-spec.ant.xml">
   519                   outputFile="${temp.build.dir}/source-test-spec.ant.xml">
   646         <!-- Make a copy in BOM dir -->
   654         <!-- Make a copy in BOM dir -->
   647         <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
   655         <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
   648     </target>
   656     </target>
   649 
   657 
   650     <target name="sf-preprocess-package-config">
   658     <target name="sf-preprocess-package-config">
   651 	<echo message="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   659     <echo message="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   652         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   660         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   653             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   661             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   654             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   662             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   655             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   663             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   656             <arg value="${temp.build.dir}/zip.cfg.xml.ftl"/>
   664             <arg value="${temp.build.dir}/zip.cfg.xml.ftl"/>
   779     <target name="sf-log-to-brag">
   787     <target name="sf-log-to-brag">
   780         <mkdir dir="${build.log.dir}/summary"/>
   788         <mkdir dir="${build.log.dir}/summary"/>
   781         <echo message="Generating ${sf.brag.id}_BRAG.xml from ${sf.brag.log}"/>
   789         <echo message="Generating ${sf.brag.id}_BRAG.xml from ${sf.brag.log}"/>
   782         <exec executable="perl" failonerror="false" output="${build.log.dir}/summary/${sf.brag.id}_BRAG.xml" logError="true">
   790         <exec executable="perl" failonerror="false" output="${build.log.dir}/summary/${sf.brag.id}_BRAG.xml" logError="true">
   783             <arg value="${sf.common.config.dir}/tools/brag/logToBRAG.pl"/>
   791             <arg value="${sf.common.config.dir}/tools/brag/logToBRAG.pl"/>
   784 	    <arg value="--phase=${sf.brag.phase}"/>
   792         <arg value="--phase=${sf.brag.phase}"/>
   785             <arg value="--step=${sf.brag.step}"/>
   793             <arg value="--step=${sf.brag.step}"/>
   786             <arg value="--rules=${sf.common.config.dir}/tools/brag/rules.${sf.brag.id}.tsv"/>
   794             <arg value="--rules=${sf.common.config.dir}/tools/brag/rules.${sf.brag.id}.tsv"/>
   787             <arg value="${sf.brag.log}"/>
   795             <arg value="${sf.brag.log}"/>
   788         </exec>
   796         </exec>
   789         <!-- And copy the XSL so the output can be transformed by a browser -->
   797         <!-- And copy the XSL so the output can be transformed by a browser -->