buildframework/helium/tools/release/release.ant.xml
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 645 b8d81fa19e7d
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
    67     The message contents of the Grace upload completion mail
    67     The message contents of the Grace upload completion mail
    68     @type string
    68     @type string
    69     @editable required
    69     @editable required
    70     @scope public
    70     @scope public
    71     -->
    71     -->
       
    72     
       
    73     <!--* @property robot.release.enabled
       
    74     Set to true to do build robot release after completing the build and if it successful.
       
    75     @type boolean
       
    76     @editable required
       
    77     @scope public
       
    78     @since 11.0
       
    79     -->
       
    80     
       
    81     <!--* @property do.robot.release
       
    82     Set to synergy project name to doing the build robot release. - deprecated: Start using robot.release.enabled property.
       
    83     @type string
       
    84     @editable required
       
    85     @scope public
       
    86     @deprecated since 11.0
       
    87     -->
       
    88     
       
    89     <!--* @property internal.robot.release.enabled
       
    90     Internal property to run the robot release property if robot.release.enabled set to true. 
       
    91     @type string
       
    92     @scope private
       
    93     -->
       
    94     
       
    95     <!-- Check, is robot release is enabled -->
       
    96     <condition property="internal.robot.release.enabled">
       
    97         <and>
       
    98             <or>
       
    99                 <istrue value="${robot.release.enabled}"/>
       
   100                 <isset property="do.robot.release"/>
       
   101             </or>
       
   102             <isset property="s60.build.robot.path"/>
       
   103         </and>    
       
   104     </condition>
    72 
   105 
    73     <fileset id="release.files" dir="${publish.dir}">
   106     <fileset id="release.files" dir="${publish.dir}">
    74         <include name="logs/**/*" />
   107         <include name="logs/**/*" />
    75         <include name="development_flash_images/**/*" />
   108         <include name="development_flash_images/**/*" />
    76         <include name="release_flash_images/**/*" />
   109         <include name="release_flash_images/**/*" />
    99     This property represent the releasing interval. The syntax is as follow: day1,time1,day2,time2,projectname;day1,time1,day2,time2,projectname2 With day and time matching the following properties: day [1, 14] time [00, 23]:[00, 59] Example: 2,10:00,3,20:00,ABS_domain
   132     This property represent the releasing interval. The syntax is as follow: day1,time1,day2,time2,projectname;day1,time1,day2,time2,projectname2 With day and time matching the following properties: day [1, 14] time [00, 23]:[00, 59] Example: 2,10:00,3,20:00,ABS_domain
   100     @type string
   133     @type string
   101     @editable required
   134     @editable required
   102     @scope public
   135     @scope public
   103     -->
   136     -->
   104 
   137     
   105     <!--
   138     <!--* @property robot.release.project
   106         This target sets the '''do.robot.release''' property so it activates 
   139     Synergy project name to be delivered onto build robot.
   107         the '''ido-sources-to-s60-build-robot''' target.
   140     @type string
   108     -->
   141     @scope private
   109     <target name="check-robot-release" if="s60.build.robot.path">
   142     -->
       
   143     
       
   144     <!-- Will check is it required to do the sources release to build robot using the property  s60.build.robot.date -->
       
   145     <target name="check-robot-release" if="internal.robot.release.enabled">
   110         <script language="jython" setbeans="false">
   146         <script language="jython" setbeans="false">
   111             <![CDATA[
   147             <![CDATA[
   112 self.setTaskName("check-robot-release")
   148 self.setTaskName("check-robot-release")
   113 
   149 
   114 import ido
   150 import ido
   119         config = map(lambda x: x.strip(), configstr.split(','))
   155         config = map(lambda x: x.strip(), configstr.split(','))
   120         try:
   156         try:
   121             if ido.is_in_interval(int(config[0]), config[1], int(config[2]), config[3]):
   157             if ido.is_in_interval(int(config[0]), config[1], int(config[2]), config[3]):
   122                 self.log("It is release time!")
   158                 self.log("It is release time!")
   123                 projects.append(config[4])
   159                 projects.append(config[4])
   124                 project.setProperty('do.robot.release', ",".join(projects))
   160                 project.setProperty('robot.release.project', ",".join(projects))
   125             else:
   161             else:
   126                 self.log("It is not release time!")
   162                 self.log("It is not release time!")
   127         except Exception, e:
   163         except Exception, e:
   128             self.log("'%s' invalid configuration." % configstr)
   164             self.log("'%s' invalid configuration." % configstr)
   129 else:
   165 else:
   135     <!-- Sources are sent to the S60 build robot by all the IDOs. 
   171     <!-- Sources are sent to the S60 build robot by all the IDOs. 
   136     This target collects all the sources based on the System Definition file, 
   172     This target collects all the sources based on the System Definition file, 
   137     zip them all and send to the specified location. There is only one but mandatory 
   173     zip them all and send to the specified location. There is only one but mandatory 
   138     property to tell the location of the build server which is "s60.build.robot.path".
   174     property to tell the location of the build server which is "s60.build.robot.path".
   139     -->
   175     -->
   140     <target name="ido-sources-to-s60-build-robot" if="do.robot.release" depends="ido-create-ado-mapping,check-robot-release,lookup-email">
   176     <target name="ido-sources-to-s60-build-robot" if="internal.robot.release.enabled" depends="ido-create-ado-mapping,check-robot-release,lookup-email">
   141         <!-- Location of the ready.txt FMPP template (override that property if you want to customize the content).
   177         <if>
   142         @type string
   178             <isset property="robot.release.project"/>
   143         @scope private
   179             <then>
   144         -->
   180                 <!-- Location of the ready.txt FMPP template (override that property if you want to customize the content).
   145         <property name="ido.template.robot.ready" location="${helium.dir}/tools/common/templates/ido/ready.txt.ftl" />
   181                 @type string
   146         <tempfile property="s60robot.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}" />
   182                 @scope private
   147         <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-robot-zip.ant.xml.ftl" outputFile="${s60robot.dynamic.config}">
   183                 -->
   148             <data expandProperties="yes">
   184                 <property name="ido.template.robot.ready" location="${helium.dir}/tools/common/templates/ido/ready.txt.ftl" />
   149                     inputfile: antProperty(ado.mapping.file)
   185                 <tempfile property="s60robot.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}" />
   150                     ant: antProperties()
   186                 <fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-robot-zip.ant.xml.ftl" outputFile="${s60robot.dynamic.config}">
   151                     data: eval('
   187                     <data expandProperties="yes">
   152                                             java.io.FileInputStream pin = new java.io.FileInputStream(filename);
   188                             inputfile: antProperty(ado.mapping.file)
   153                                             java.util.Properties props = new java.util.Properties();
   189                             ant: antProperties()
   154                                             props.load(pin);
   190                             data: eval('
   155                         return props;
   191                                 java.io.FileInputStream pin = new java.io.FileInputStream(filename);
   156                             ', {filename: get(inputfile)})
   192                                 java.util.Properties props = new java.util.Properties();
   157             </data>
   193                                 props.load(pin);
   158         </fmpp>
   194                                 return props;
   159         <ant antfile="${s60robot.dynamic.config}" target="all" />
   195                                     ', {filename: get(inputfile)})
   160         <fmpp sourceFile="${ido.template.robot.ready}" outputFile="${s60.build.robot.path}/ready.txt">
   196                     </data>
   161             <data expandProperties="yes">
   197                 </fmpp>
   162                 ant: antProperties()
   198                 <ant antfile="${s60robot.dynamic.config}" target="all" />
   163             </data>
   199                 <fmpp sourceFile="${ido.template.robot.ready}" outputFile="${s60.build.robot.path}/ready.txt">
   164         </fmpp>
   200                     <data expandProperties="yes">
       
   201                         ant: antProperties()
       
   202                     </data>
       
   203                 </fmpp>
       
   204             </then>
       
   205             <else>
       
   206                 <echo>It is not release time!</echo>
       
   207             </else>
       
   208         </if>
   165     </target>
   209     </target>
   166 
   210 
   167 </project>
   211 </project>