51 Defines configuration file used in synergy operations (ccm-get-input for example). This file contains definition of projects that are checkouted or snapshotted. |
51 Defines configuration file used in synergy operations (ccm-get-input for example). This file contains definition of projects that are checkouted or snapshotted. |
52 @type string |
52 @type string |
53 @editable required |
53 @editable required |
54 @scope public |
54 @scope public |
55 --> |
55 --> |
56 |
56 |
57 <hlm:recordfilterset id="prepWorkArea.logextract.config"> |
|
58 <hlm:recordfilter category="error" regexp="^ERROR:" /> |
|
59 <hlm:recordfilter category="warning" regexp="^WARNING:" /> |
|
60 <hlm:recordfilter category="info" regexp="^INFO:" /> |
|
61 </hlm:recordfilterset> |
|
62 |
|
63 |
|
64 <!-- This target uses an XML input file to retrieve content from Synergy. |
57 <!-- This target uses an XML input file to retrieve content from Synergy. |
65 --> |
58 --> |
66 <target name="prep-work-area" depends="log-build-start" if="run.ccm"> |
59 <target name="prep-work-area" depends="log-build-start" if="run.ccm"> |
67 <hlm:tempRecordStartMacro name="${build.id}_ccm_get_input.log" /> |
60 <hlm:tempRecordStartMacro name="${build.id}_ccm_get_input.log" /> |
68 <runtarget target="get-ccm-password"/> |
61 <runtarget target="get-ccm-password"/> |
110 <hlm:assertFileExists file="${build.cache.log.dir}/${build.id}_ccm_get_input.log" /> |
103 <hlm:assertFileExists file="${build.cache.log.dir}/${build.id}_ccm_get_input.log" /> |
111 </finally> |
104 </finally> |
112 </trycatch> |
105 </trycatch> |
113 </target> |
106 </target> |
114 |
107 |
|
108 |
|
109 <!-- |
|
110 This target will cleanup all snapshoted/checkout project from the disk. Checked out project will |
|
111 also be deleted from the synergy database. |
|
112 --> |
|
113 <target name="cleanup-work-area" if="run.ccm"> |
|
114 <hlm:tempRecordStartMacro name="${build.id}_cleanup_work_area.log" /> |
|
115 <runtarget target="get-ccm-password"/> |
|
116 <runtarget target="ccm-prepare-input"/> |
|
117 |
|
118 <hlm:assertPropertySet property="prep.delivery.file" message="Property prep.delivery.file is not defined." /> |
|
119 <trycatch> |
|
120 <try> |
|
121 <hlm:python failonerror="true"> |
|
122 import preparation |
|
123 import configuration |
|
124 import traceback |
|
125 import logging |
|
126 import ant |
|
127 import sys |
|
128 import os.path |
|
129 |
|
130 # enabling logging |
|
131 logging.basicConfig(level=logging.INFO) |
|
132 |
|
133 builder = None |
|
134 try: |
|
135 configBuilder = configuration.NestedConfigurationBuilder(open(ant.get_property(r'${prep.delivery.conf.parsed}'), 'r')) |
|
136 configSet = configBuilder.getConfiguration() |
|
137 password = ant.get_property(r'${ccm.user.password}') |
|
138 builder = preparation.PreparationBuilder(configSet.getConfigurations(), ant.get_property(r'${ccm.user.login}'), password, cache=ant.get_property(r'${ccm.cache.xml}')) |
|
139 builder.cleanup() |
|
140 builder.close() |
|
141 except Exception, e: |
|
142 print "ERROR: error found during preparation phase:" |
|
143 for l in traceback.format_exc().splitlines(False): |
|
144 print "ERROR: %s" % l |
|
145 print "ERROR: this is a critical error, build will fail now:" |
|
146 for l in str(e).splitlines(False): |
|
147 print "ERROR: %s" % l |
|
148 if builder != None: |
|
149 builder.close() |
|
150 sys.exit(-1) |
|
151 sys.exit(0) |
|
152 </hlm:python> |
|
153 </try> |
|
154 <finally> |
|
155 <hlm:tempRecordStopMacro name="${build.id}_cleanup_work_area.log" filterref="filterset.prepWorkArea" phase="prep"/> |
|
156 <hlm:assertFileExists file="${build.cache.log.dir}/${build.id}_cleanup_work_area.log" /> |
|
157 </finally> |
|
158 </trycatch> |
|
159 </target> |
|
160 |
115 </project> |
161 </project> |