changeset 628 | 7c4a911dc066 |
parent 588 | c7c26511138f |
child 645 | b8d81fa19e7d |
588:c7c26511138f | 628:7c4a911dc066 |
---|---|
29 <!-- Your synergy work area directory (Set as the parent of the helium dir by default). |
29 <!-- Your synergy work area directory (Set as the parent of the helium dir by default). |
30 @type string |
30 @type string |
31 --> |
31 --> |
32 <property name="create.bom.workarea.root" value="."/> |
32 <property name="create.bom.workarea.root" value="."/> |
33 |
33 |
34 <!--* @property bom.release.regex |
|
35 This property (if set) defines the regular expression BOM will use to extract data from |
|
36 a basline release. The regular expression must define 4 fields: TYPE, YEAR, WEEK, REVISION |
|
37 Example: |
|
38 (?<TYPE>.*)_(?P<YEAR>\d{4})(?P<WEEK>\d{2})_(?<REVISION>.*) |
|
39 |
|
40 @type string |
|
41 @editable allowed |
|
42 @scope public |
|
43 --> |
|
44 |
|
34 <!-- The target create-bom creates a Bill-Of-Material based on the SCM project |
45 <!-- The target create-bom creates a Bill-Of-Material based on the SCM project |
35 The target can be run in the project's root directory or the directory can be given by |
46 The target can be run in the project's root directory or the directory can be given by |
36 setting the property create.bom.workarea.root. The IDO builds are expected to set it to their |
47 setting the property create.bom.workarea.root. The IDO builds are expected to set it to their |
37 projects work area directory. --> |
48 projects work area directory. --> |
38 <target name="create-bom" depends="get-ccm-password,old-bom-log,ccm-prepare-input,prep-prepare-input"> |
49 <target name="create-bom"> |
50 <runtarget target="get-ccm-password"/> |
|
51 <runtarget target="old-bom-log"/> |
|
52 <runtarget target="prep-prepare-input" /> |
|
53 <runtarget target="ccm-prepare-input"/> |
|
39 <hlm:startSpecificLogMacro name="${prep.log.dir}/${build.id}_bom.log" regexp="${ccm.user.password}" phase="prep"/> |
54 <hlm:startSpecificLogMacro name="${prep.log.dir}/${build.id}_bom.log" regexp="${ccm.user.password}" phase="prep"/> |
40 <hlm:python> |
55 <hlm:python> |
41 import os |
56 import os |
42 import build.model |
57 import build.model |
43 import configuration |
58 import configuration |
47 import sys |
62 import sys |
48 import traceback |
63 import traceback |
49 |
64 |
50 session = None |
65 session = None |
51 try: |
66 try: |
52 runccm = ant.get_property(r'${run.ccm}') |
67 runccm = ant.get_property(r'${ccm.enabled}') |
53 database = ant.get_property(r'${ccm.database}') |
68 database = ant.get_property(r'${ccm.database}') |
54 username = ant.get_property(r'${ccm.user.login}') |
69 username = ant.get_property(r'${ccm.user.login}') |
55 password = ant.get_property(r'${ccm.user.password}') |
70 password = ant.get_property(r'${ccm.user.password}') |
56 engine = ant.get_property(r'${ccm.engine.host}') |
71 engine = ant.get_property(r'${ccm.engine.host}') |
57 dbpath = ant.get_property(r'${ccm.database.path}') |
72 dbpath = ant.get_property(r'${ccm.database.path}') |
79 else: |
94 else: |
80 session = provider.get(username, password, engine, dbpath) |
95 session = provider.get(username, password, engine, dbpath) |
81 |
96 |
82 ccmproject = ccm.extra.get_toplevel_project(session, waroot) |
97 ccmproject = ccm.extra.get_toplevel_project(session, waroot) |
83 |
98 |
84 config_data = {'delivery': deliveryfile, 'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'ccm.database': database, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml"} |
99 config_data = {'delivery': deliveryfile, 'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'ccm.database': database, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml", 'release_regexp': ant.get_property(r'${bom.release.regex}') } |
85 config = configuration.Configuration(config_data) |
100 config = configuration.Configuration(config_data) |
86 |
101 |
87 # let's only support the new spec model! |
102 # let's only support the new spec model! |
88 bom = build.model.SynergyBOM(config, ccmproject, username=username, password=password, provider=provider) |
103 bom = build.model.SynergyBOM(config, ccmproject, username=username, password=password, provider=provider) |
89 |
104 |