author | lorewang |
Wed, 17 Nov 2010 11:24:29 +0800 | |
changeset 685 | 39f7ecf8fbc7 |
parent 645 | b8d81fa19e7d |
permissions | -rw-r--r-- |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
2 |
<!-- |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
3 |
============================================================================ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
4 |
Name : release.ant.xml |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
5 |
Part of : Helium |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
6 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
8 |
All rights reserved. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
9 |
This component and the accompanying materials are made available |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
10 |
under the terms of the License "Eclipse Public License v1.0" |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
11 |
which accompanies this distribution, and is available |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html". |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
13 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
14 |
Initial Contributors: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
15 |
Nokia Corporation - initial contribution. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
16 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
17 |
Contributors: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
18 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
19 |
Description: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
20 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
21 |
============================================================================ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
22 |
--> |
217 | 23 |
<!--* @package releases --> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
24 |
<project name="release" xmlns:hlm="http://www.nokia.com/helium"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
25 |
<description> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
26 |
Release publising. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
27 |
</description> |
588 | 28 |
|
29 |
<import file="scm_release.ant.xml" /> |
|
30 |
||
31 |
<!-- This is where the release build logs are stored. |
|
32 |
@type string |
|
33 |
@scope private |
|
34 |
--> |
|
645 | 35 |
<property name="release.log.dir" location="${build.log.dir}/release"/> |
628 | 36 |
|
37 |
<!--* @property robot.release.enabled |
|
38 |
Set to true to do build robot release after completing the build and if it successful. |
|
39 |
@type boolean |
|
40 |
@editable required |
|
41 |
@scope public |
|
42 |
@since 11.0 |
|
43 |
--> |
|
44 |
||
45 |
<!--* @property do.robot.release |
|
46 |
Set to synergy project name to doing the build robot release. - deprecated: Start using robot.release.enabled property. |
|
47 |
@type string |
|
48 |
@editable required |
|
49 |
@scope public |
|
50 |
@deprecated since 11.0 |
|
51 |
--> |
|
52 |
||
53 |
<!--* @property internal.robot.release.enabled |
|
54 |
Internal property to run the robot release property if robot.release.enabled set to true. |
|
55 |
@type string |
|
56 |
@scope private |
|
57 |
--> |
|
58 |
||
59 |
<!-- Check, is robot release is enabled --> |
|
60 |
<condition property="internal.robot.release.enabled"> |
|
645 | 61 |
<or> |
62 |
<istrue value="${robot.release.enabled}"/> |
|
63 |
<isset property="do.robot.release"/> |
|
64 |
</or> |
|
628 | 65 |
</condition> |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
66 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
67 |
<fileset id="release.files" dir="${publish.dir}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
68 |
<include name="logs/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
69 |
<include name="development_flash_images/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
70 |
<include name="release_flash_images/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
71 |
<include name="sisfiles/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
72 |
<include name="build_area/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
73 |
<include name="test_results/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
74 |
<include name="utilities/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
75 |
</fileset> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
76 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
77 |
<!-- Copies release.files fileset into publish.release.folder destination --> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
78 |
<target name="release"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
79 |
<mkdir dir="${publish.release.dir}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
80 |
<copy todir="${publish.release.dir}" preservelastmodified="true" failonerror="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
81 |
<fileset refid="release.files" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
82 |
</copy> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
83 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
84 |
|
217 | 85 |
<!--* @property s60.build.robot.path |
86 |
Location where to publish the build robot delivery. |
|
87 |
@type string |
|
88 |
@editable required |
|
89 |
@scope public |
|
90 |
--> |
|
91 |
||
92 |
<!--* @property s60.build.robot.date |
|
93 |
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 |
|
94 |
@type string |
|
95 |
@editable required |
|
96 |
@scope public |
|
97 |
--> |
|
628 | 98 |
|
99 |
<!--* @property robot.release.project |
|
100 |
Synergy project name to be delivered onto build robot. |
|
101 |
@type string |
|
102 |
@scope private |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
103 |
--> |
628 | 104 |
|
105 |
<!-- Will check is it required to do the sources release to build robot using the property s60.build.robot.date --> |
|
106 |
<target name="check-robot-release" if="internal.robot.release.enabled"> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
107 |
<script language="jython" setbeans="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
108 |
<![CDATA[ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
109 |
self.setTaskName("check-robot-release") |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
110 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
111 |
import ido |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
112 |
projects = [] |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
113 |
mconfigstr = project.getProperty('s60.build.robot.date') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
114 |
if mconfigstr != None: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
115 |
for configstr in mconfigstr.split(';'): |
645 | 116 |
config = [x.strip() for x in configstr.split(',')] |
117 |
if len(config) < 4: |
|
118 |
raise Exception(configstr + ' is invalid config') |
|
119 |
if ido.is_in_interval(int(config[0]), config[1], int(config[2]), config[3]): |
|
120 |
self.log("It is release time!") |
|
121 |
projects.append(config[4]) |
|
122 |
project.setProperty('robot.release.project', ",".join(projects)) |
|
123 |
else: |
|
124 |
self.log("It is not release time!") |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
125 |
else: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
126 |
self.log("'s60.build.robot.date' is not defined.") |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
127 |
]]> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
128 |
</script> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
129 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
130 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
131 |
<!-- Sources are sent to the S60 build robot by all the IDOs. |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
132 |
This target collects all the sources based on the System Definition file, |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
133 |
zip them all and send to the specified location. There is only one but mandatory |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
134 |
property to tell the location of the build server which is "s60.build.robot.path". |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
135 |
--> |
645 | 136 |
<target name="ido-sources-to-s60-build-robot" if="internal.robot.release.enabled" depends="check-robot-release,lookup-email"> |
628 | 137 |
<if> |
138 |
<isset property="robot.release.project"/> |
|
139 |
<then> |
|
645 | 140 |
<property name="robot.mapping.file" location="${build.output.dir}/build/ado_mapping_robot.ini" /> |
141 |
<hlm:createAdoMappingMacro adoMapFile="${robot.mapping.file}" /> |
|
628 | 142 |
<!-- Location of the ready.txt FMPP template (override that property if you want to customize the content). |
143 |
@type string |
|
144 |
@scope private |
|
145 |
--> |
|
645 | 146 |
<property name="ido.template.robot.ready" location="${helium.dir}/tools/release/templates/ready.txt.ftl" /> |
628 | 147 |
<tempfile property="s60robot.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}" /> |
645 | 148 |
<fmpp sourceFile="${helium.dir}/tools/release/templates/ido-robot-zip.ant.xml.ftl" outputFile="${s60robot.dynamic.config}"> |
628 | 149 |
<data expandProperties="yes"> |
645 | 150 |
inputfile: antProperty(robot.mapping.file) |
628 | 151 |
ant: antProperties() |
152 |
data: eval(' |
|
153 |
java.io.FileInputStream pin = new java.io.FileInputStream(filename); |
|
154 |
java.util.Properties props = new java.util.Properties(); |
|
155 |
props.load(pin); |
|
156 |
return props; |
|
157 |
', {filename: get(inputfile)}) |
|
158 |
</data> |
|
159 |
</fmpp> |
|
160 |
<ant antfile="${s60robot.dynamic.config}" target="all" /> |
|
161 |
<fmpp sourceFile="${ido.template.robot.ready}" outputFile="${s60.build.robot.path}/ready.txt"> |
|
162 |
<data expandProperties="yes"> |
|
163 |
ant: antProperties() |
|
164 |
</data> |
|
165 |
</fmpp> |
|
166 |
</then> |
|
167 |
<else> |
|
168 |
<echo>It is not release time!</echo> |
|
169 |
</else> |
|
170 |
</if> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
171 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
172 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
173 |
</project> |