bldsystemtools/commonbldutils/BuildLaunch.xml
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 31 Mar 2010 23:20:42 +0300
branchRCL_3
changeset 4 a9d4531388d0
parent 0 83f4b4db085c
permissions -rw-r--r--
Revision: 201013 Kit: 201013

<?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 #IMPLIED>
  <!ATTLIST SetEnv Name CDATA #REQUIRED>
  <!ATTLIST SetEnv Value CDATA #REQUIRED>
]>
<Product Name="Build Launch">
  <Commands>
    <!--Set Env-->
    <!--SnapshotNumber, PreviousSnapshotNumber and ChangelistNumber need to be Completed-->
    <SetEnv Name="SnapshotNumber" Value="<TMPL_VAR NAME=tmpl_snapshot>"/>	<!--Changeme is MCL Snapshot Number-->
    <SetEnv Name="PreviousSnapshotNumber" Value="<TMPL_VAR NAME=tmpl_snapshot_previous>"/>	<!--Changeme is Previous MCL Snapshot Number-->
    <SetEnv Name="CDBCompareSnapshotNumber" Value="%PreviousSnapshotNumber%"/>	<!--Snapshot Number for CDB Comparison-->
    <SetEnv Name="ChangelistNumber" Value="<TMPL_VAR NAME=tmpl_changelist>"/>	<!--Changeme is Perforce CL Number-->
    <SetEnv Name="CurrentCodeline" Value="<TMPL_VAR NAME=tmpl_codeline>"/> <!--Changeme if build from delivery branch-->
    <SetEnv Name="Platform" Value="<TMPL_VAR NAME=tmpl_platform>"/> <!--Changeme is platform name beech/cedar-->
    <SetEnv Name="Product" Value="<TMPL_VAR NAME=tmpl_build_short_name>"/> <!--Changeme is product name 8.1a, 8.1b, 9.0, 9.1-->

    <SetEnv Name="BuildSubType" Value="<TMPL_VAR NAME=tmpl_build_sub_type>"/>

    <!-- Build Publishing and Disk Space-->
    <SetEnv Name="PublishLocation" Value="<TMPL_VAR NAME=tmpl_publish_location>"/> <!--Changeme if Test Build-->
    <SetEnv Name="PublishDiskSpaceMin" Value="20"/> <!--Disk space required - Gigabytes-->
    <SetEnv Name="BuildExpiryDays" Value="14"/>     <!--Applies to files at %PublishLocation%-->
    <SetEnv Name="LocalDiskSpaceMin" Value="90"/>   <!--Disk space required - Gigabytes-->

    <!-- BC Comparitor Variable-->
    <SetEnv Name="BCToolsBaseBuildNo" Value="<TMPL_VAR NAME=tmpl_snapshot_external>"/>	<!--Changeme for regular and Test Builds, is Recent external build Number-->
    
    <SetEnv Name="BCCurrentCodeline" Value="%CurrentCodeline%"/>
    <SetEnv Name="BuildShortName" Value="%Product%"/>
    <SetEnv Name="BuildBaseName" Value="Symbian_OS_v%BuildShortName%"/>
    <SetEnv Name="BuildNumber" Value="%SnapshotNumber%_%BuildBaseName%"/>
    <SetEnv Name="PreviousBuildNumber" Value="%PreviousSnapshotNumber%_%BuildBaseName%"/>
    <SetEnv Name="CDBPreviousBuildNumber" Value="%CDBCompareSnapshotNumber%_%BuildBaseName%"/>
    <SetEnv Name="BaseBuildNumber" Value="%BCToolsBaseBuildNo%_%BuildBaseName%"/>
    <SetEnv Name="Type" Value="<TMPL_VAR NAME=tmpl_type>"/>

    <SetEnv Name="BuildsDirect" Value="<TMPL_VAR NAME=tmpl_dir>"/>

    <SetEnv Name="BuildDir" Value="M:"/>
    <SetEnv Name="TypeDir" Value="%BuildsDirect%\%Type%"/>
    <SetEnv Name="SubstDir" Value="%BuildsDirect%\%BuildNumber%"/>
    <SetEnv Name="CleanSourceDir" Value="%BuildDir%\clean-src"/>
    <SetEnv Name="SourceDir" Value="%BuildDir%\sf"/>
    <SetEnv Name="OutputDir" Value="%BuildDir%\bin\%Platform%"/>
    <SetEnv Name="ToolsDir" Value="%BuildsDirect%\maintools"/>
    <SetEnv Name="LogsDir" Value="%BuildDir%\logs\%Platform%"/>
    <SetEnv Name="BootstrapDir" Value="%BuildDir%\tools"/>

    <SetEnv Name="EPOCROOT" Value="\"/>
    <SetEnv Name="ZipDir" Value="%BuildDir%\zips"/>
    <SetEnv Name="PATH" Value="%EPOCROOT%epoc32\gcc\bin;%EPOCROOT%epoc32\tools;C:\Apps\GnuPG;%PATH%"/>
    <SetEnv Name="ProductPath" Value="%BuildDir%\Product\%Platform%"/>
    <SetEnv Name="DeltaCache" Value="%BuildsDirect%\%Type%\src-%Platform%"/>
    <SetEnv Name="BootstrapDeltaCache" Value="%BuildsDirect%\%Type%\src-bootstrap"/>
    <SetEnv Name="PreviousBuildPublishLocation" Value="\\Builds01\devbuilds"/>  <!--for test build CDB comparisons-->
    <SetEnv Name="SmokeTestServerPool" Value="LON-SYSBUILD04#LON-SYSBUILD05#LON-ENGBLDDVD01#LON-PDTEST01"/>
    <SetEnv Name="CdbZipLocation" Value="%CleanSourceDir%\os\buildtools\toolsandutils\cdb\distribution"/>
    <SetEnv Name="ABLDCACHE" Value="%BuildDir%\abldcache"/>
    <SetEnv Name="AutoBFCServerPool" Value="LON-ENGBUILD20#LON-ENGBUILD21#LON-ENGBUILD22"/>

    <!-- START PHASE PREBUILD  -->
    <Execute Component="Start Phase PREBUILD" Cwd="%ToolsDir%\bin" CommandLine="perl %ToolsDir%\os\buildtools\bldsystemtools\commonbldutils\start-perl.pl -- notifyBuildPhase.pl -s %SnapshotNumber% -p %BuildShortName% -n PREBUILD -t START"/>


    <!--Start Performance Monitoring -->
    <Execute Component="Starting PerfMon" Cwd="%ToolsDir%\os\buildtools\bldsystemtools\commonbldutils\PerfMon" CommandLine="perl PerfMonControl.pl -p 1973 -f %LogsDir%\PerfMon_%BuildNumber%.csv -c PerfMon.cfg"/>


    <!--Stop Anti-Virus Services-->
    <Execute Component="Stop Anti-Virus Services" Cwd="%ToolsDir%\os\buildtools\bldsystemtools\commonbldutils" CommandLine="Perl AntiVirus.pl -c STOP" ExitOnScanlogError="y"/>

    <!--LogsDir already created by startbuild/TBAS-->
    <Execute Component="Subst Build Dir" Cwd="%ToolsDir%\os\buildtools\bldsystemtools\commonbldutils" CommandLine="subst.pl -v %BuildDir% -p %SubstDir% -f"/>
    <Execute Component="Make Bin Dir" Cwd="%BuildDir%" CommandLine="mkdir %OutputDir%"/>
    <Execute Component="Make Publish Logs Dir" Cwd="%BuildDir%" CommandLine="mkdir %PublishLocation%\%Type%\%BuildNumber%\logs"/>
   
    <!--Time Stamp the build-->
    <Execute Component="Time Stamp Build" Cwd="%ToolsDir%\os\buildtools\bldsystemtools\commonbldutils" CommandLine="perl BuildStamp.pl -b %BuildNumber% -d %BuildExpiryDays% -p %PublishLocation%\%Type%"/>
 
    <!-- Generate and Copy PC and Perforce Table over into the Publish Logs Location --> 
    <Execute Component="Generate PC and P4 Table" Cwd="%ToolsDir%\os\buildtools\bldsystemtools\commonbldutils" CommandLine="perl PC_P4Table.pl" ExitOnScanlogError="y"/>
    <Execute Component="Copy PC and P4 Table to Local Logs Dir" Cwd="%ToolsDir%\os\buildtools\bldsystemtools\commonbldutils" CommandLine="copy %SnapshotNumber%_%Product%PC_Perforce_report.html %LogsDir%\%SnapshotNumber%_%Product%PC_Perforce_report.html" /> 
    <Execute Component="Publish PC and P4 Table to builds01 Logs Dir" Cwd="%LogsDir%" CommandLine="copy %SnapshotNumber%_%Product%PC_Perforce_report.html %PublishLocation%\%Type%\%BuildNumber%\logs\%SnapshotNumber%_%Product%PC_Perforce_report.html" /> 

    <!--Check space and remove old local builds if necessary-->
    <Execute Component="Remove Old Local Builds" Cwd="%BuildDir%" CommandLine="perl %ToolsDir%\os\buildtools\bldsystemtools\commonbldutils\remove_old_builds.pl %BuildNumber% %BuildsDirect% %LocalDiskSpaceMin%000000000"/>
    
    <!--PrebuildChecks-->
    <Execute Component="PreBuildChecks" Cwd="%BuildDir%" CommandLine="perl %ToolsDir%\os\buildtools\bldsystemtools\commonbldutils\PreBldChecks.pl -l %LogsDir%\prebuild.log -e I_EXT_SysBuildSupport@nokia.com" ExitOnScanlogError="y"/>

    <!-- START PHASE SYNC  -->
    <Execute Component="Start Phase SYNC" Cwd="%ToolsDir%\bin" CommandLine="perl %ToolsDir%\os\buildtools\bldsystemtools\commonbldutils\start-perl.pl -- notifyBuildPhase.pl -s %SnapshotNumber% -p %BuildShortName% -n SYNC -t START"/>
 
    <!--Get Source-->
    <Execute Component="Perforce Sync" Cwd="%ToolsDir%\os\buildtools\bldsystemtools\commonbldutils\perforce" CommandLine="perl syncsource.pl -t %BuildSubType%" ExitOnScanlogError="y"/>

    <!-- STOP PHASE SYNC  -->
    <Execute Component="Stop Phase SYNC" Cwd="%ToolsDir%\bin" CommandLine="perl %ToolsDir%\os\buildtools\bldsystemtools\commonbldutils\start-perl.pl -- notifyBuildPhase.pl -s %SnapshotNumber% -p %BuildShortName% -n SYNC -t STOP"/>
    
    <!--Record Delivery to the delivery database for this build -->
    <Execute Component="Record Delivery" Cwd="%CleanSourceDir%\os\buildtools\bldsystemtools\commonbldutils" CommandLine="perl record_delivery.pl -t \\builds01\devbuilds\BuildTeam\record_delivery\SymbianKK.tmpl -t \\builds01\devbuilds\BuildTeam\record_delivery\SymbianIndia.tmpl -t \\builds01\devbuilds\BuildTeam\record_delivery\SymbianChina.tmpl -t \\builds01\devbuilds\BuildTeam\record_delivery\NokiaFinland.tmpl -c \\builds01\devbuilds\BuildTeam\record_delivery\email.cfg -e BuildNumber=%BuildNumber% -e PublishLocation=%PublishLocation% -e COMPUTERNAME=%COMPUTERNAME%"/>

 </Commands>
</Product>