common/build.postbuild.xml
changeset 699 cdfb88270be0
parent 698 382728cd25d2
parent 696 b9ad18cda425
child 716 a0829a1a0d41
equal deleted inserted replaced
698:382728cd25d2 699:cdfb88270be0
    75             </then>
    75             </then>
    76         </if>
    76         </if>
    77 
    77 
    78         <!-- Zip up all the logs -->
    78         <!-- Zip up all the logs -->
    79         <runtarget target="sf-zip-logs"/>
    79         <runtarget target="sf-zip-logs"/>
    80         <runtarget target="sf-brag-to-diamonds"/>
    80         
    81 
       
    82         <!-- Publish logs/reports -->
       
    83         <if>
    81         <if>
    84             <istrue value="${sf.spec.publish.enable}" />
    82             <istrue value="${sf.spec.publish.enable}" />
    85             <then>
    83             <then>
       
    84                 <echo message="Send links to Diamonds"/>
       
    85                 <runtarget target="sf-links-to-diamonds"/>
       
    86                 <echo message="Send BRAG status information to Diamonds"/>
       
    87                 <runtarget target="sf-brag-to-diamonds"/>
       
    88                 
    86                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
    89                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
    87                 <runtarget target="sf-publish"/>
    90                 <runtarget target="sf-publish"/>
    88             </then>
    91             </then>
    89         </if>
    92         </if>
    90     </target>
    93     </target>
   370             <arg value="--unreciped"/>
   373             <arg value="--unreciped"/>
   371             <arg value="--recipe"/>
   374             <arg value="--recipe"/>
   372             <arg value="--config=${raptorconfig}"/>
   375             <arg value="--config=${raptorconfig}"/>
   373             <arg value="--log=@{raptorlogfile}"/>
   376             <arg value="--log=@{raptorlogfile}"/>
   374             <arg value="--basedir=${build.log.dir}/raptorbits"/>
   377             <arg value="--basedir=${build.log.dir}/raptorbits"/>
       
   378             <arg value="--append"/>
   375           </exec>
   379           </exec>
   376         </sequential>
   380         </sequential>
   377       </for>
   381       </for>
   378       
   382       
   379       <echo message="Summarizing Raptor data"/>
   383       <echo message="Summarizing Raptor data"/>
   504             <arg value="${build.log.dir}/analysis/${build.id}_what_results.csv"/>
   508             <arg value="${build.log.dir}/analysis/${build.id}_what_results.csv"/>
   505         </exec>
   509         </exec>
   506     </target>
   510     </target>
   507 
   511 
   508     <target name="sf-run-analysis-diamonds">      
   512     <target name="sf-run-analysis-diamonds">      
   509       <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis.xml">
   513       <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis-diamonds.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis-diamonds.xml">
   510         <data expandProperties="yes">
   514         <data expandProperties="yes">
   511           ant: antProperties()
   515           ant: antProperties()
   512           raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,config,component,phase,recipe,file,line]})
   516           raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,config,component,phase,recipe,file,line]})
   513           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
   517         </data>
       
   518       </fmpp>
       
   519     </target>
       
   520     
       
   521     <target name="sf-links-to-diamonds">
       
   522       <fmpp sourceFile="${sf.common.config.dir}/diamonds/linksForDiamonds.xml.ftl" outputFile="${build.log.dir}/linksForDiamonds.xml">
       
   523         <data expandProperties="yes">
       
   524           ant: antProperties()
   514         </data>
   525         </data>
   515       </fmpp>
   526       </fmpp>
   516       <!-- Send the data to the server -->
   527       <!-- Send the data to the server -->
   517 	  <exec executable="python">
   528 	  <exec executable="python">
   518 		    <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
   529 		    <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
   519 		    <arg value="-s"/>
   530 		    <arg value="-s"/>
   520 		    <arg value="${diamonds.host}"/>
   531 		    <arg value="${diamonds.host}"/>
   521 		    <arg value="-u"/>
   532 		    <arg value="-u"/>
   522 		    <arg value="${diamonds.build.id}"/>
   533 		    <arg value="${diamonds.build.id}"/>
   523 		    <arg value="-f"/>
   534 		    <arg value="-f"/>
   524 		    <arg value="${build.log.dir}/sf-run-analysis.xml"/>
   535 		    <arg value="${build.log.dir}/linksForDiamonds.xml"/>
   525 	  </exec>
   536 	  </exec>
   526     </target>    
   537     </target>
   527 
   538 
   528     <target name="sf-brag-to-diamonds">
   539     <target name="sf-brag-to-diamonds">
   529         <!-- Merge all our bits of XML together -->
   540         <!-- Merge all our bits of XML together -->
   530         <exec executable="perl" output="${build.log.dir}/summary/_BRAG.xml" logError="true">
   541         <exec executable="perl" output="${build.log.dir}/summary/_BRAG.xml" logError="true">
   531             <arg value="${sf.common.config.dir}/tools/mergeXML.pl"/>
   542             <arg value="${sf.common.config.dir}/tools/mergeXML.pl"/>
   784                 <echo message="INFO Validate Zip files"/>
   795                 <echo message="INFO Validate Zip files"/>
   785                 <runtarget target="sf-package-validate"/>
   796                 <runtarget target="sf-package-validate"/>
   786             </then>
   797             </then>
   787         </if>
   798         </if>
   788         <runtarget target="sf-zip-logs"/>
   799         <runtarget target="sf-zip-logs"/>
   789         <runtarget target="sf-brag-to-diamonds"/>
   800                 
   790         <if>
   801         <if>
   791             <istrue value="${sf.spec.publish.enable}" />
   802             <istrue value="${sf.spec.publish.enable}" />
   792             <then>
   803             <then>
       
   804                 <echo message="Send links to Diamonds"/>
       
   805                 <runtarget target="sf-links-to-diamonds"/>
       
   806                 <echo message="Send BRAG status information to Diamonds"/>
       
   807                 <runtarget target="sf-brag-to-diamonds"/>
       
   808                 
   793                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
   809                 <echo message="Publish log files and reports to ${sf.spec.publish.rootdir}"/>
   794                 <runtarget target="sf-publish"/>
   810                 <runtarget target="sf-publish"/>
   795             </then>
   811             </then>
   796         </if>
   812         </if>
   797     </target>
   813     </target>