bldsystemtools/commonbldutils/postbuild.xml
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 01:39:43 +0200
changeset 0 83f4b4db085c
permissions -rw-r--r--
Revision: 201005 Kit: 201005

<?xml version="1.0"?>
<!DOCTYPE Build  [
  <!ELEMENT Product (Commands)>
  <!ATTLIST Product name CDATA #REQUIRED>
  <!ELEMENT Commands (Execute+ | SetEnv*)>
  <!ELEMENT Execute EMPTY>
  <!ATTLIST Execute ID CDATA #REQUIRED>
  <!ATTLIST Execute Stage CDATA #REQUIRED>
  <!ATTLIST Execute Component CDATA #REQUIRED>
  <!ATTLIST Execute Cwd CDATA #REQUIRED>
  <!ATTLIST Execute CommandLine CDATA #REQUIRED>
  <!ELEMENT SetEnv EMPTY>
  <!ATTLIST SetEnv Order ID #REQUIRED>
  <!ATTLIST SetEnv Name CDATA #REQUIRED>
  <!ATTLIST SetEnv Value CDATA #REQUIRED>
]>
<Product Name="MCL Build">
  <Commands>    

    <!-- START PHASE POSTBUILD -->
    <Execute ID="1" Stage="1" Component="Start Phase POSTBUILD" Cwd="%ToolsDir%\bin" CommandLine="perl %CleanSourceDir%\os\buildtools\bldsystemtools\commonbldutils\start-perl.pl -- notifyBuildPhase.pl -s %SnapshotNumber% -p %BuildShortName% -n POSTBUILD -t START"/>
    <Execute Component="Publish Postbuild Start to Diamonds" Cwd="%LogsDir%" CommandLine="perl %SourceDir%\os\buildtools\bldsystemtools\commonbldutils\GenResult\GenDiamondsXml.pl -t BUILD -i START -s %DiamondsServer%"/>
    
    <!-- To be used in conjunction with a MCL build environment -->
    <!-- Extract information from Windows Event Logs for the duration of the current build. Publish -->
    <Execute ID="2" Stage="2" Component="EventLogReader WinEvents" Cwd="%LogsDir%" CommandLine="perl %SourceDir%\os\buildtools\bldsystemtools\commonbldutils\EventLogReader.pl -l %BuildNumber%.log -k %BuildBaseName%.log -o %BuildNumber%_WinEvents.log"/>
    <Execute ID="3" Stage="3" Component="HTMLScanlog Results" Cwd="%LogsDir%" CommandLine="perl %SourceDir%\os\buildtools\bldsystemtools\buildsystemtools\scanlog\htmlscanlog.pl -t %BuildNumber%.log -v -v -l %BuildNumber%.log -l %BuildBaseName%.log -l %BuildNumber%_WinEvents.log -o %BuildNumber%.summary.html -c %PublishLocation%\%Type%\logs\%Type%.csv -m %PublishLocation%\%Type%\logs\machineclass.csv"/>

    <!--Publish components files -->
    <Execute ID="4" Stage="4" Component="Publish GTcomponents.txt" Cwd="%BuildDir%" CommandLine="copy \sf\os\deviceplatformrelease\symbianosbld\productionbldcbrconfig\%Product%\GTcomponents.txt %PublishLocation%\%Type%\%BuildNumber%\logs\GTcomponents.txt"/>
    <Execute ID="5" Stage="5" Component="Publish GTcomponents.txt" Cwd="%BuildDir%" CommandLine="copy \sf\os\deviceplatformrelease\symbianosbld\productionbldcbrconfig\%Product%\GTcomponents.txt %PublishLocation%\%Type%\logs\%BuildNumber%\GTcomponents.txt"/>
    <Execute ID="6" Stage="6" Component="Publish TVcomponents.txt" Cwd="%BuildDir%" CommandLine="copy \sf\os\deviceplatformrelease\symbianosbld\productionbldcbrconfig\%Product%\TechViewComponents.txt %PublishLocation%\%Type%\%BuildNumber%\logs\TechViewComponents.txt"/>
    <Execute ID="7" Stage="7" Component="Publish TVcomponents.txt" Cwd="%BuildDir%" CommandLine="copy \sf\os\deviceplatformrelease\symbianosbld\productionbldcbrconfig\%Product%\TechViewComponents.txt %PublishLocation%\%Type%\logs\%BuildNumber%\TechViewComponents.txt"/>

    <!-- Publish all the results -->
    <Execute ID="8" Stage="8" Component="Publish Log" Cwd="%LogsDir%" CommandLine="copy %BuildNumber%.summary.html %PublishLocation%\%Type%\%BuildNumber%\logs\"/>
    <Execute ID="9" Stage="9" Component="Publish Log" Cwd="%LogsDir%" CommandLine="copy %BuildNumber%.summary.html %PublishLocation%\%Type%\logs\%BuildNumber%\"/>
    <Execute ID="10" Stage="10" Component="Publish Log" Cwd="%LogsDir%" CommandLine="copy %BuildNumber%.log %PublishLocation%\%Type%\%BuildNumber%\logs\"/>
    <Execute ID="11" Stage="11" Component="Publish Log" Cwd="%LogsDir%" CommandLine="copy %BuildNumber%.log %PublishLocation%\%Type%\logs\%BuildNumber%\"/>
    <Execute ID="12" Stage="12" Component="Publish Log" Cwd="%LogsDir%" CommandLine="copy prebuild.log %PublishLocation%\%Type%\%BuildNumber%\logs\"/>
    <Execute ID="13" Stage="13" Component="Publish Log" Cwd="%LogsDir%" CommandLine="copy prebuild.log %PublishLocation%\%Type%\logs\%BuildNumber%\"/>
    <Execute ID="14" Stage="14" Component="Publish WinEvent Log" Cwd="%LogsDir%" CommandLine="copy %BuildNumber%_WinEvents.log %PublishLocation%\%Type%\%BuildNumber%\logs\"/>
    <Execute ID="15" Stage="15" Component="Publish WinEvent Log" Cwd="%LogsDir%" CommandLine="copy %BuildNumber%_WinEvents.log %PublishLocation%\%Type%\logs\%BuildNumber%\"/>
    <Execute ID="16" Stage="16" Component="Publish Log" Cwd="%LogsDir%" CommandLine="copy BuildLaunch.xml %PublishLocation%\%Type%\%BuildNumber%\logs\"/>
    <Execute ID="17" Stage="17" Component="Publish Log" Cwd="%LogsDir%" CommandLine="copy %BuildBaseName%.log %PublishLocation%\%Type%\%BuildNumber%\logs\"/>
    <Execute ID="18" Stage="18" Component="Publish Build Env XML" Cwd="%LogsDir%" CommandLine="copy lon-eng*.xml %PublishLocation%\%Type%\%BuildNumber%\logs\"/>
    
    <Execute ID="19" Stage="19" Component="Publish imreport log" Cwd="%BuildDir%" CommandLine="xcopy %LogsDir%\imreport.log %PublishLocation%\%Type%\%BuildNumber%\logs /z/e/i/q"/>
    <Execute ID="20" Stage="20" Component="Publish imreport log" Cwd="%BuildDir%" CommandLine="xcopy %LogsDir%\imreport.log %PublishLocation%\%Type%\logs\%BuildNumber% /z/e/i/q"/>
    <Execute ID="21" Stage="21" Component="Publish imreport xml to logs directory" Cwd="%LogsDir%" CommandLine="xcopy %LogsDir%\imrep_%BuildNumber%.xml %PublishLocation%\%Type%\logs\%BuildNumber% /z/e/i/q"/>

    <Execute ID="22" Stage="22" Component="Publish CDB" Cwd="%BuildDir%" CommandLine="xcopy %BuildDir%\cdb-info\cdb.db.* %PublishLocation%\%Type%\%BuildNumber%\cdb-info /z/e/i/q"/>
  
    <Execute ID="23" Stage="23" Component="Publish BC Previous Results" Cwd="%BuildDir%" CommandLine="xcopy %BuildDir%\cdb-info\*-prev.* %PublishLocation%\%Type%\%BuildNumber%\cdb-info /z/e/i/q"/>
    <Execute ID="24" Stage="24" Component="Publish BC Previous Results to archive" Cwd="%BuildDir%" CommandLine="xcopy %BuildDir%\cdb-info\*-prev.* %PublishLocation%\%Type%\logs\%BuildNumber%\cdb-info /z/e/i/q"/>

    <Execute ID="25" Stage="25" Component="Publish BC Baseline Results" Cwd="%BuildDir%" CommandLine="xcopy %BuildDir%\cdb-info\*-base.* %PublishLocation%\%Type%\%BuildNumber%\cdb-info /z/e/i/q"/>
    <Execute ID="26" Stage="26" Component="Publish BC Baseline Results" Cwd="%BuildDir%" CommandLine="xcopy %BuildDir%\cdb-info\*-base.* %PublishLocation%\%Type%\logs\%BuildNumber%\cdb-info /z/e/i/q"/>
    
    <!-- Create and Publish Changes Report -->
    <Execute ID="27" Stage="27" Component="Generate Changes Report" Cwd="%LogsDir%" CommandLine="perl %CleanSourceDir%\os\buildtools\bldsystemtools\commonbldutils\GenerateChangesReport.pl %Product% %Platform% %SnapshotNumber% %ChangelistNumber% %BuildNumber% %CurrentCodeline% %BCToolsBaseBuildNo% %PublishLocation%\%Type% %CleanSourceDir%"/>
    <Execute ID="28" Stage="28" Component="Publish Changes Report" Cwd="%LogsDir%" CommandLine="copy Symbian_OS_v%Product%_Changes_Report.html %PublishLocation%\%Type%\logs\%BuildNumber%\Symbian_OS_v%Product%_Changes_Report.html"/>
    <Execute ID="29" Stage="29" Component="Publish Changes Report" Cwd="%LogsDir%" CommandLine="copy Symbian_OS_v%Product%_Changes_Report.html %PublishLocation%\%Type%\%BuildNumber%\logs\Symbian_OS_v%Product%_Changes_Report.html"/>

    <!-- Create and Publish Antivirus Log(s) -->
    <Execute ID="30" Stage="30" Component="Run Anti Virus Scan" Cwd="%SourceDir%\os\buildtools\bldsystemtools\commonbldutils" CommandLine="Perl AntiVirus.pl -c SCAN -o %LogsDir% -d %BuildDir%\CBRGT -d %BuildDir%\CBRTV"/>
    <Execute ID="31" Stage="31" Component="Publish Anti Virus Log" Cwd="%LogsDir%" CommandLine="copy %LogsDir%\anti-virus.log %PublishLocation%\%Type%\%BuildNumber%\logs\anti-virus.log"/>
    <Execute ID="32" Stage="32" Component="Publish Anti Virus Log" Cwd="%LogsDir%" CommandLine="copy %LogsDir%\anti-virus.log %PublishLocation%\%Type%\logs\%BuildNumber%\anti-virus.log"/>

    <!-- Generate build results table -->
    <Execute ID="33" Stage="33" Component="Create ESR Build Report" Cwd="%LogsDir%" CommandLine="perl %SourceDir%\os\buildtools\bldsystemtools\commonbldutils\GenResult\GenResult.pl -t BUILD -b FINAL -d %PublishLocation%\%Type%\%BuildNumber%\logs\ -s %SnapshotNumber% -p %Product% -l %PublishLocation%\%Type%\logs\%BuildNumber%\ -m"/>
    <Execute ID="34" Stage="34" Component="Publish ESR Build Report" Cwd="%LogsDir%" CommandLine="copy /Y %SnapshotNumber%_%Product%_report.html %PublishLocation%\%Type%\%BuildNumber%\logs\"/>    
    <Execute ID="35" Stage="35" Component="Publish ESR Build Report" Cwd="%LogsDir%" CommandLine="copy /Y %SnapshotNumber%_%Product%_report.html %PublishLocation%\%Type%\logs\%BuildNumber%\"/>  
    
    <!-- Post-build removal of old local builds to speed up build launch process -->
    <Execute ID="36" Stage="36" Component="Post-build Removal Of Old Local Builds" Cwd="%BuildDir%" CommandLine="perl %SourceDir%\os\buildtools\bldsystemtools\commonbldutils\remove_old_builds.pl %BuildNumber% %BuildsDirect% %LocalDiskSpaceMin%000000000" />     

    <!-- STOP PHASE POSTBUILD -->
    <Execute ID="37" Stage="37" Component="Stop Phase POSTBUILD" Cwd="%ToolsDir%\bin" CommandLine="perl %CleanSourceDir%\os\buildtools\bldsystemtools\commonbldutils\start-perl.pl -- notifyBuildPhase.pl -s %SnapshotNumber% -p %BuildShortName% -n POSTBUILD -t STOP"/>
    <Execute ID="38" Stage="38" Component="Publish Postbuild End to Diamonds" Cwd="%LogsDir%" CommandLine="perl %SourceDir%\os\buildtools\bldsystemtools\commonbldutils\GenResult\GenDiamondsXml.pl -t BUILD -i STOP -s %DiamondsServer%"/> 
    <Execute ID="39" Stage="39" Component="Publish Build End to Diamonds" Cwd="%LogsDir%" CommandLine="perl %SourceDir%\os\buildtools\bldsystemtools\commonbldutils\GenResult\GenDiamondsXml.pl -t ENDBUILD -i START -s %DiamondsServer%"/> 
    
    <Execute ID="40" Stage="40" Component="Publish Diaomnds XML zip" Cwd="%LogsDir%" CommandLine="copy DiamondsXmls.zip %PublishLocation%\%Type%\%BuildNumber%\logs\"/>
    <Execute ID="41" Stage="41" Component="Publish Diaomnds XML zip" Cwd="%LogsDir%" CommandLine="copy DiamondsXmls.zip %PublishLocation%\%Type%\logs\%BuildNumber%\"/>
    
    <Execute ID="42" Stage="42" Component="Publish postbuild Log" Cwd="%LogsDir%" CommandLine="copy postbuild.log %PublishLocation%\%Type%\%BuildNumber%\logs\"/>
    <Execute ID="43" Stage="43" Component="Publish postbuild Log" Cwd="%LogsDir%" CommandLine="copy postbuild.log %PublishLocation%\%Type%\logs\%BuildNumber%\"/>
    
    <!-- Restart Anti-Virus and Anti-Spyware Services  -->
    <Execute ID="44" Stage="44" Component="Re-start Anti-Virus Services" Cwd="%SourceDir%\os\buildtools\bldsystemtools\commonbldutils" CommandLine="Perl AntiVirus.pl -c START"/>

    <!-- Restart Anti-Virus and Anti-Spyware must be the 2nd-to-last step! -->
    
    <Execute ID="45" Stage="45" Component="Publish imreport xml" Cwd="%LogsDir%" CommandLine="xcopy %LogsDir%\imrep_%BuildNumber%.xml %PublishLocation%\%Type%\%BuildNumber%\logs /z/e/i/q"/> 
    
	<!-- Report missing stages in Main/Post Build logs -->
    <Execute ID="46" Stage="46" Component="Missing Stages" Cwd="%LogsDir%" CommandLine="perl %SourceDir%\os\buildtools\bldsystemtools\commonbldutils\missingstages.pl"/>

    <!-- Report missing stages must be the last step! -->
	
	
  </Commands>
</Product>