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