buildframework/helium/tools/preparation/preparation.ant.xml
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 645 b8d81fa19e7d
--- a/buildframework/helium/tools/preparation/preparation.ant.xml	Wed Jun 16 16:51:40 2010 +0300
+++ b/buildframework/helium/tools/preparation/preparation.ant.xml	Fri Aug 13 14:59:05 2010 +0300
@@ -36,6 +36,79 @@
     @type string
     -->
     <property name="ccmgetinput" value="ccmgetinput" />
+    
+    <!--* Set to false to skip diamonds.
+    @type boolean
+    @editable required
+    @scope public
+    @since 11.0
+    -->
+    <property name="diamonds.enabled" value="true"/>
+
+    
+    <!--* @property internal.diamonds.enabled
+    Run the diamonds related targets if diamonds.enabled is set to true.
+    @type boolean
+    @scope private
+    -->
+    
+    <!--* @property skip.diamonds 
+    Set to true to skip diamonds. - deprecated: Start using diamonds.enabled property.
+    @type boolean
+    @editable required
+    @scope public
+    @deprecated since 11.0
+    -->       
+    
+    <!--* @property ccm.enabled
+    Defines that property if you want the ccm-get-input step to be run during the build area preparation.
+    @type boolean
+    @editable required
+    @scope public
+    -->
+        
+    <!--* @property internal.ccm.enabled
+    Set to run synergy targets if ccm.enabled set to true.
+    @type boolean
+    @scope private
+    -->
+    
+    <!--* @property remote.builds.enabled
+    Set to true to run the builds on remote machines.
+    @type boolean
+    @scope public
+    @editable required
+    @since 11.0
+    -->
+    
+    <!--* @property internal.remote.builds.enabled
+    Set to run remote build targets if remote.builds.enabled set to true.
+    @type boolean
+    @scope private
+    -->
+    
+    <!-- Check, is diamonds feature enabled -->
+    <condition property="internal.diamonds.enabled">
+        <and>
+            <not>
+                <isfalse value="${diamonds.enabled}" />
+            </not>
+            <not>
+                <isset property="skip.diamonds"/>
+            </not>
+        </and>
+    </condition>
+    
+    <!-- Check, is synergy enabled -->
+    <condition property="internal.ccm.enabled">
+        <istrue value="${ccm.enabled}"/>
+    </condition>
+    
+    <!-- Check, is synergy enabled -->
+    <condition property="internal.remote.builds.enabled">
+        <istrue value="${remote.builds.enabled}"/>
+    </condition>
+    
 
     <typedef file="${ant.file.preparation}/../preparation.antlib.xml" uri="http://www.nokia.com/helium"/>
     <import file="bom/bom.ant.xml" />
@@ -46,10 +119,7 @@
     <import file="ivy/dependencies.ant.xml"/>
 
 
-    <!--
-        Gets a release from GRACE.
-        TODO: Improve interface with customer configuration, getenv_options should be replaced by set of properties.
-    -->
+    <!-- Gets a release from network drive. -->
     <target name="preparation-getenv" if="base_release.path" depends="init-build-area">
         <!-- Making sure we have nothing to pass -->
         <property name="base_release.path" value=""/>
@@ -310,6 +380,7 @@
         <propertyref name="noe.password" />
         <propertyref name="ats.password" />
         <propertyref name="hydra.password" />
+        <propertyref name="coverity.password" />
     </propertyset>
     
     <!-- Logs the Ant property build environment. -->
@@ -352,7 +423,10 @@
                 <not>
                     <isset property="env.HLM_SUBCON"/>
                 </not>
-                <isset property="use.dragonfly"/>
+                <or>
+                    <istrue value="${dragonfly.enabled}"/>
+                    <isset property="use.dragonfly"/>
+                </or>
             </and>
             <then>
                 <antcall target="dragonfly-prep-drive"/>
@@ -440,18 +514,24 @@
         </copy>
         
     </target>
-    
+
+    <!-- Loading some properties from the cache. Mainly diamonds related properties are
+         stored in there. 
+     -->
+    <target name="load-property-from-cache-file">
+        <if>
+            <available file="${build.property.cache.file}" />
+            <then>
+                <property file="${build.property.cache.file}" />
+            </then>
+        </if>
+    </target>
+
     <!-- This target exists as a trigger for initiating the Diamonds logger. If 
           it is not included in the build sequence, the build will not be logged to 
           Diamonds. Also  build.property.cache.file will be there contains all the diamonds related properties 
     --> 
-    <target name="diamonds">
-        <!--* @property skip.diamonds
-        Set to true to skip diamonds.
-        @type boolean
-        @editable required
-        @scope public
-        -->
+    <target name="diamonds" if="internal.diamonds.enabled" depends="load-property-from-cache-file">
         <mkdir dir="${diamonds.build.output.dir}" />
         <var name="diamonds.build.url"  value="http://${diamonds.host}:${diamonds.port}${diamonds.build.id}"/>
         <echoproperties destfile="${build.property.cache.file}">
@@ -467,22 +547,6 @@
     <!-- Used to prep the build area, now only a placeholder target for the customer -->
     <target name="prep-copy" />
 
-    <!--* @property ccm.enabled
-    Defines that property if you want the ccm-get-input step to be run during the build area preparation.
-    @type boolean
-    @editable required
-    @scope public
-    -->
-    
-    <condition property="run.ccm">
-        <and>
-            <not>
-                <equals arg1="${ccm.enabled}" arg2="false" casesensitive="true"/>
-            </not>
-            <isset property="ccm.enabled"/>
-        </and>
-    </condition>
-    
     <!-- Wrapper target to call prep-work-area during the build.
          log will get recorded under the log directory.
          Property ccm.enabled has to be set to 'true' to enable that step!
@@ -498,16 +562,17 @@
          log will get recorded under the log directory.
          Property remote.builds.enabled has to be defined to enable that step!
       -->
-    <target name="do-start-remote-builds" if="remote.builds.enabled">
+    <target name="do-start-remote-builds" if="internal.remote.builds.enabled">
         <runtarget target="start-remote-builds"/>
     </target>
     
     
     <!-- check-env-prep has to be called after getting the delivery else it doesn't works for the first build. -->
-    <target name="do-prep" depends="check-tool-dependencies,check-free-space,do-prep-work-area,
+    <target name="do-prep" depends="check-free-space,do-prep-work-area,
                                     do-start-remote-builds,check-env-prep,diamonds,create-bom,log-build-env,prep-copy,
                                     set-arm-version" />
     
+    
     <!-- Macro to notify user by email/sms -->
     <macrodef name="notifyMacro" uri="http://www.nokia.com/helium">
         <attribute name="message"/>
@@ -538,7 +603,7 @@
                 <metadatafilterset refid="filterset.ant.output" />
             </hlm:antmetadatainput>
         </hlm:metadatarecord>
-        <hlm:generateBuildStatus file="${build.id}_main.ant.log" />
+        <hlm:generateBuildStatus file="${build.log.dir}/${build.id}_main.ant.log" />
         <!-- Todo: metadata: insert assertions for metadata parsing here -->
     </target>