author | Bob Rosenberg <bob.rosenberg@nokia.com> |
Mon, 13 Sep 2010 13:52:18 +0100 | |
changeset 656 | 88e01c8f013e |
parent 628 | 7c4a911dc066 |
child 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 |
--> |
|
35 |
<property name="release.log.dir" location="${build.log.dir}/release"/> |
|
36 |
||
217 | 37 |
|
38 |
<!--* @property release.grace.service |
|
39 |
The Grace service used |
|
40 |
@type string |
|
41 |
@editable required |
|
42 |
@scope public |
|
43 |
--> |
|
44 |
||
45 |
<!--* @property release.grace.product |
|
46 |
The Grace product used |
|
47 |
@type string |
|
48 |
@editable required |
|
49 |
@scope public |
|
50 |
--> |
|
51 |
||
52 |
<!--* @property release.grace.mail.to |
|
53 |
To whom the completion mail is sent to |
|
54 |
@type string |
|
55 |
@editable required |
|
56 |
@scope public |
|
57 |
--> |
|
58 |
||
59 |
<!--* @property release.grace.mail.subject |
|
60 |
The subject of the Grace upload completion mail |
|
61 |
@type string |
|
62 |
@editable required |
|
63 |
@scope public |
|
64 |
--> |
|
65 |
||
66 |
<!--* @property release.grace.mail.message |
|
67 |
The message contents of the Grace upload completion mail |
|
68 |
@type string |
|
69 |
@editable required |
|
70 |
@scope public |
|
71 |
--> |
|
628 | 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> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
105 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
106 |
<fileset id="release.files" dir="${publish.dir}"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
107 |
<include name="logs/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
108 |
<include name="development_flash_images/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
109 |
<include name="release_flash_images/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
110 |
<include name="sisfiles/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
111 |
<include name="build_area/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
112 |
<include name="test_results/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
113 |
<include name="utilities/**/*" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
114 |
</fileset> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
115 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
116 |
<!-- 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
|
117 |
<target name="release"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
118 |
<mkdir dir="${publish.release.dir}" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
119 |
<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
|
120 |
<fileset refid="release.files" /> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
121 |
</copy> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
122 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
123 |
|
217 | 124 |
<!--* @property s60.build.robot.path |
125 |
Location where to publish the build robot delivery. |
|
126 |
@type string |
|
127 |
@editable required |
|
128 |
@scope public |
|
129 |
--> |
|
130 |
||
131 |
<!--* @property s60.build.robot.date |
|
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 |
|
133 |
@type string |
|
134 |
@editable required |
|
135 |
@scope public |
|
136 |
--> |
|
628 | 137 |
|
138 |
<!--* @property robot.release.project |
|
139 |
Synergy project name to be delivered onto build robot. |
|
140 |
@type string |
|
141 |
@scope private |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
142 |
--> |
628 | 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"> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
146 |
<script language="jython" setbeans="false"> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
147 |
<![CDATA[ |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
148 |
self.setTaskName("check-robot-release") |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
149 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
150 |
import ido |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
151 |
projects = [] |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
152 |
mconfigstr = project.getProperty('s60.build.robot.date') |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
153 |
if mconfigstr != None: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
154 |
for configstr in mconfigstr.split(';'): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
155 |
config = map(lambda x: x.strip(), configstr.split(',')) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
156 |
try: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
157 |
if ido.is_in_interval(int(config[0]), config[1], int(config[2]), config[3]): |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
158 |
self.log("It is release time!") |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
159 |
projects.append(config[4]) |
628 | 160 |
project.setProperty('robot.release.project', ",".join(projects)) |
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
161 |
else: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
162 |
self.log("It is not release time!") |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
163 |
except Exception, e: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
164 |
self.log("'%s' invalid configuration." % configstr) |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
165 |
else: |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
166 |
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
|
167 |
]]> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
168 |
</script> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
169 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
170 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
171 |
<!-- 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
|
172 |
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
|
173 |
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
|
174 |
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
|
175 |
--> |
628 | 176 |
<target name="ido-sources-to-s60-build-robot" if="internal.robot.release.enabled" depends="ido-create-ado-mapping,check-robot-release,lookup-email"> |
177 |
<if> |
|
178 |
<isset property="robot.release.project"/> |
|
179 |
<then> |
|
180 |
<!-- Location of the ready.txt FMPP template (override that property if you want to customize the content). |
|
181 |
@type string |
|
182 |
@scope private |
|
183 |
--> |
|
184 |
<property name="ido.template.robot.ready" location="${helium.dir}/tools/common/templates/ido/ready.txt.ftl" /> |
|
185 |
<tempfile property="s60robot.dynamic.config" suffix=".xml" deleteonexit="false" destdir="${temp.build.dir}" /> |
|
186 |
<fmpp sourceFile="${helium.dir}/tools/common/templates/ido/ido-robot-zip.ant.xml.ftl" outputFile="${s60robot.dynamic.config}"> |
|
187 |
<data expandProperties="yes"> |
|
188 |
inputfile: antProperty(ado.mapping.file) |
|
189 |
ant: antProperties() |
|
190 |
data: eval(' |
|
191 |
java.io.FileInputStream pin = new java.io.FileInputStream(filename); |
|
192 |
java.util.Properties props = new java.util.Properties(); |
|
193 |
props.load(pin); |
|
194 |
return props; |
|
195 |
', {filename: get(inputfile)}) |
|
196 |
</data> |
|
197 |
</fmpp> |
|
198 |
<ant antfile="${s60robot.dynamic.config}" target="all" /> |
|
199 |
<fmpp sourceFile="${ido.template.robot.ready}" outputFile="${s60.build.robot.path}/ready.txt"> |
|
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> |
|
1
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
209 |
</target> |
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
210 |
|
be27ed110b50
Bringing in Helium, imaker and cmaker
Alex Gilkes <alex.gilkes@nokia.com>
parents:
diff
changeset
|
211 |
</project> |