588
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : scm_release.ant.xml
|
|
5 |
Part of : Helium
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<!--* @package releases -->
|
|
24 |
<project name="scm-release" xmlns:hlm="http://www.nokia.com/helium">
|
|
25 |
<description>
|
|
26 |
SCM Release publishing.
|
|
27 |
</description>
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
<!--
|
|
32 |
The release-work-area target will reuse the prep-work-area configuration
|
|
33 |
to retrieve what project to release based on the releasable
|
|
34 |
and baseline.release configuration xml properties.
|
|
35 |
Each project releasing will follow these steps:
|
|
36 |
* un-maitained work area
|
|
37 |
* Using RBT tool
|
|
38 |
* deconfigure
|
|
39 |
* rebaseline
|
|
40 |
* update
|
|
41 |
* maintain the work area
|
|
42 |
-->
|
645
|
43 |
<target name="release-work-area" if="internal.ccm.enabled">
|
588
|
44 |
<mkdir dir="${release.log.dir}" />
|
628
|
45 |
<hlm:record name="${release.log.dir}/${build.id}_release_work_area.log" action="start"/>
|
588
|
46 |
<runtarget target="get-ccm-password"/>
|
|
47 |
<runtarget target="ccm-prepare-input"/>
|
|
48 |
|
|
49 |
<hlm:assertPropertySet property="prep.delivery.file" message="Property prep.delivery.file is not defined." />
|
|
50 |
<trycatch>
|
|
51 |
<try>
|
|
52 |
<hlm:python failonerror="true">
|
|
53 |
import preparation
|
|
54 |
import configuration
|
|
55 |
import traceback
|
|
56 |
import logging
|
|
57 |
import ant
|
|
58 |
import sys
|
|
59 |
import os.path
|
|
60 |
|
|
61 |
# enabling logging
|
|
62 |
logging.basicConfig(level=logging.INFO)
|
|
63 |
|
645
|
64 |
configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r'))
|
|
65 |
configSet = configBuilder.getConfiguration()
|
|
66 |
password = ant.get_property(r'${ccm.user.password}')
|
|
67 |
builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}'))
|
588
|
68 |
try:
|
|
69 |
builder.extract_release_data(r'${release.log.dir}/${build.id}_releasable.xml')
|
645
|
70 |
finally:
|
588
|
71 |
builder.close()
|
|
72 |
</hlm:python>
|
|
73 |
</try>
|
|
74 |
<finally>
|
628
|
75 |
<hlm:record name="${release.log.dir}/${build.id}_release_work_area.log" action="stop"/>
|
588
|
76 |
<hlm:assertFileExists file="${release.log.dir}/${build.id}_release_work_area.log" />
|
|
77 |
</finally>
|
|
78 |
</trycatch>
|
|
79 |
<hlm:assertFileExists file="${release.log.dir}/${build.id}_releasable.xml" />
|
|
80 |
|
|
81 |
<fmpp sourceFile="${helium.dir}/tools/release/templates/release_ccm_project.ant.xml.ftl"
|
|
82 |
outputFile="${temp.build.dir}/release_ccm_project.ant.xml">
|
|
83 |
<data expandProperties="yes">
|
|
84 |
data: xml(${release.log.dir}/${build.id}_releasable.xml)
|
|
85 |
ant: antProperties()
|
|
86 |
</data>
|
|
87 |
</fmpp>
|
|
88 |
<hlm:assertFileExists file="${temp.build.dir}/release_ccm_project.ant.xml" />
|
|
89 |
<ant antfile="${temp.build.dir}/release_ccm_project.ant.xml" target="all" />
|
|
90 |
</target>
|
|
91 |
|
|
92 |
</project> |