common/build.postbuild.xml
changeset 592 85da6704f82d
parent 589 a18cdecf36b3
child 599 27e421bea313
equal deleted inserted replaced
591:0dd169f56564 592:85da6704f82d
   281         <if>
   281         <if>
   282           <istrue value="${sf.spec.publish.enable}"/>
   282           <istrue value="${sf.spec.publish.enable}"/>
   283             <then>
   283             <then>
   284             <runtarget target="sf-run-analysis-diamonds"/>
   284             <runtarget target="sf-run-analysis-diamonds"/>
   285             </then>
   285             </then>
   286         </if>    
   286         </if>
       
   287 	<runtarget target="sf-brag-to-diamonds"/>
   287     </target>
   288     </target>
   288 
   289 
   289     <target name="sf-run-analysis-ant">    
   290     <target name="sf-run-analysis-ant">    
   290         <echo message="Running source analysis of ANT output"/>
   291         <echo message="Running source analysis of ANT output"/>
   291         <exec executable="perl" dir="${build.log.dir}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_scan_ant.log">
   292         <exec executable="perl" dir="${build.log.dir}" failonerror="false" output="${build.log.dir}/analysis/${build.id}_scan_ant.log">
   486           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
   487           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
   487         </data>
   488         </data>
   488       </fmpp>
   489       </fmpp>
   489     </target>    
   490     </target>    
   490 
   491 
       
   492     <target name="sf-brag-to-diamonds">
       
   493         <!-- Merge all our bits of XML together -->
       
   494         <exec executable="perl" output="${build.log.dir}/summary/_BRAG.xml">
       
   495             <arg value="${sf.common.config.dir}/tools/mergeXML.pl"/>
       
   496             <arg value="--xsl=brag.xsl"/>
       
   497             <arg value="--merge=buildStatus,phase(name),step(name),failures(level)"/>
       
   498             <arg value="${build.log.dir}/summary/*?_BRAG.xml"/>
       
   499         </exec>
       
   500         <!-- Run XSL transform to create file to send to diamonds -->
       
   501         <java jar="${sf.common.config.dir}/sysdefdowngrade/xalan-j_2_7_1/xalan.jar" fork="true">
       
   502             <arg value="-IN"/>
       
   503             <arg value="${build.log.dir}/summary/_BRAG.xml"/>
       
   504             <arg value="-XSL"/>
       
   505             <arg value="${sf.common.config.dir}/tools/brag/bragForDiamonds.xsl"/>
       
   506             <arg value="-OUT"/>
       
   507             <arg value="${temp.build.dir}/bragForDiamonds.xml"/>
       
   508         </java>
       
   509         <if>
       
   510             <istrue value="${sf.spec.publish.enable}"/>
       
   511             <then>
       
   512                 <!-- Try to obtain the diamonds ID for this build -->
       
   513                 <if>
       
   514                     <isset property="diamonds.build.id"/>
       
   515                     <else>
       
   516                         <property file="${build.log.dir}/diamonds.build.id.properties"/> <!-- This will fail silently -->
       
   517                     </else>
       
   518                 </if>
       
   519                 <if>
       
   520                     <isset property="diamonds.build.id"/>
       
   521                     <then>
       
   522                         <!-- Send the data to the server -->
       
   523                         <exec executable="python">
       
   524                             <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/>
       
   525                             <arg value="-s"/>
       
   526                             <arg value="${diamonds.host}"/>
       
   527                             <arg value="-u"/>
       
   528                             <arg value="/diamonds/builds/${diamonds.build.id}"/>
       
   529                             <arg value="-f"/>
       
   530                             <arg value="${temp.build.dir}/bragForDiamonds.xml"/>
       
   531                         </exec>
       
   532                     </then>
       
   533                     <else>
       
   534                         <echo message="diamonds.build.id is not known - unable to push any build specific information to diamonds server"/>
       
   535                     </else>
       
   536                 </if>
       
   537             </then>
       
   538         </if>
       
   539     </target>
       
   540 
   491     <target name="sf-check-utilities-dir">
   541     <target name="sf-check-utilities-dir">
   492         <available property="sf-utilities-available" file="${build.drive}/utilities" type="dir"/>
   542         <available property="sf-utilities-available" file="${build.drive}/utilities" type="dir"/>
   493     </target>
   543     </target>
   494 
   544 
   495     <target name="sf-compare-to-baseline" depends="sf-diamondize-bom,sf-check-utilities-dir" if="sf-utilities-available">
   545     <target name="sf-compare-to-baseline" depends="sf-diamondize-bom,sf-check-utilities-dir" if="sf-utilities-available">