587
|
1 |
.. index::
|
|
2 |
module: Configuring Diamonds
|
|
3 |
|
|
4 |
====================
|
|
5 |
Configuring Diamonds
|
|
6 |
====================
|
|
7 |
|
|
8 |
.. contents::
|
|
9 |
|
|
10 |
Introduction
|
|
11 |
------------
|
|
12 |
Diamonds is web application that can collect all build related information and categorize
|
|
13 |
builds. It can represent build information in different metrics. This document describes how
|
628
|
14 |
to configure diamonds in helium and minimum set of properties required.
|
587
|
15 |
|
|
16 |
Diamonds Server setup
|
|
17 |
---------------------
|
628
|
18 |
These are the minimum set of properties required in order to start the diamonds. All the properties are
|
|
19 |
defined automatically with already defined set of properties. The end user would not be required to change
|
|
20 |
any thing. As these are configured once for different vendors (symbian foundation, nokia, others.)
|
587
|
21 |
|
|
22 |
<!-- Diamonds server details -->
|
628
|
23 |
|
587
|
24 |
<property name="diamonds.host" value="diamonds.xxx.com"/>
|
|
25 |
<property name="diamonds.port" value="9900"/>
|
|
26 |
|
|
27 |
|
|
28 |
Initialize diamonds
|
|
29 |
-------------------
|
|
30 |
`diamonds` target is the initialize target for diamonds logging. Call diamonds target in build target sequence
|
|
31 |
and this will log the already available data to diamonds and continue to log data onward as soon as they are available.
|
628
|
32 |
This is done already in helium build target sequence. So user can ignore this section. Earlier the diamonds
|
|
33 |
target needs to be called once the build area is initialized, but now this could be called even
|
|
34 |
before, as the output for diamonds files are generated in the cache location.
|
587
|
35 |
|
628
|
36 |
|
|
37 |
Disable diamonds reporting
|
|
38 |
--------------------------
|
|
39 |
Diamonds reporting can be skipped by defining the property ``diamonds.enabled`` to false.
|
587
|
40 |
e.g.::
|
|
41 |
|
628
|
42 |
hlm -Ddiamonds.enabled=false
|
587
|
43 |
|
|
44 |
|
628
|
45 |
Diamonds Configuration details
|
|
46 |
------------------------------
|
|
47 |
Diamonds configurations are extendable now. The default diamonds configuration is there under
|
|
48 |
${helium.dir}/config/diamonds_config_default.ant.xml. The configuration is based on ant properties
|
|
49 |
and references. So if the user wants to add process and report for new information, they can add
|
|
50 |
the details in their configurations. There are three types of information being provided using the
|
|
51 |
configurations and are below.
|
587
|
52 |
|
628
|
53 |
Properties Required:
|
|
54 |
====================
|
|
55 |
Below are the properties requried for processing diamonds. But these are mapped to predifined properties
|
|
56 |
in helium and no action required for the user. The end user would not be required to change
|
|
57 |
any thing. As these are configured once for different vendors (symbian foundation, nokia, others.)
|
587
|
58 |
|
628
|
59 |
<property name="diamonds.smtp.server" value="${email.smtp.server}" />
|
|
60 |
<property name="diamonds.ldap.server" value="${email.ldap.server}" />
|
|
61 |
<property name="diamonds.initializer.targetname" value="diamonds" />
|
|
62 |
<property name="diamonds.tstamp.format" value="yyyy-MM-dd'T'HH:mm:ss" />
|
|
63 |
<property name="diamonds.category" value="${build.family}" />
|
|
64 |
|
|
65 |
Stage Configurations:
|
|
66 |
=====================
|
|
67 |
Stages are to record information specific to stages. Stage information is used for both logging and
|
|
68 |
diamonds reporting. The build process needs to define stages clearly and map it with the configurations
|
|
69 |
as below.
|
587
|
70 |
|
|
71 |
.. code-block:: xml
|
|
72 |
|
628
|
73 |
<hlm:stage id="get-baseline" startTarget="check-free-space" endTarget="enable-abiv2" />
|
|
74 |
<hlm:stage id="get-source" startTarget="do-prep-work-area" endTarget="create-bom" />
|
|
75 |
<hlm:stage id="clean-and-prep" startTarget="ido-prep-clean-dfs" endTarget="ido-pre-compile" />
|
|
76 |
<hlm:stage id="build" startTarget="ido-build-parallel-dfs" endTarget="compile-ctc" />
|
|
77 |
<hlm:stage id="rombuild" startTarget="image-creation" endTarget="image-creation" />
|
|
78 |
<hlm:stage id="create-ATS-drop" startTarget="ats-test" endTarget="ats-aste" />
|
|
79 |
<hlm:stage id="post-build" startTarget="image-creation" endTarget="archive" />
|
|
80 |
|
|
81 |
The stage configuration provides the information about the stage starting and ending target sequence.
|
|
82 |
There should be a corresponding stagerecord for each stage, which is to store the log information
|
|
83 |
for that specific stages, please refer to logging module for more information.
|
|
84 |
|
|
85 |
Both the stages / target reporting using messaging type to provide details to be sent to diamonds
|
|
86 |
reporting. See details in messaging sections for further details.
|
|
87 |
|
|
88 |
Currently the diamonds reporting just records the start / end time using the following configuration.
|
|
89 |
|
|
90 |
.. code-block:: xml
|
|
91 |
|
|
92 |
<hlm:fmppMessage id="stage.time.message" sourceFile="${diamonds.template-dir}/diamonds_stage.xml.ftl">
|
|
93 |
<data expandProperties="yes">
|
|
94 |
ant: antProperties()
|
|
95 |
</data>
|
|
96 |
</hlm:fmppMessage>
|
|
97 |
|
|
98 |
The config takes a template to be used to convert, the template is converted using fmpp and all
|
|
99 |
the output files are processed and sent to diamonds. All the input to fmpp task could be used here.
|
|
100 |
The template diamonds_stage.xml.ftl just reports the start / end time. In addition to duration, if
|
|
101 |
the user wants to send more information for the stages it could be done by overriding the
|
|
102 |
configuration as below and controlling using the user defined template.
|
|
103 |
|
|
104 |
.. code-block:: xml
|
|
105 |
|
|
106 |
<hlm:fmppMessage id="stage.time.message" ${diamonds.custom.template.dir}/diamonds_stage_custom.xml.ftl>
|
|
107 |
<data expandProperties="yes">
|
|
108 |
ant: antProperties()
|
|
109 |
</data>
|
|
110 |
</hlm:fmppMessage>
|
587
|
111 |
|
|
112 |
|
628
|
113 |
Reporting based on target execution:
|
|
114 |
====================================
|
|
115 |
If some data needs to be sent at the end of target execution, this can be defined with below configuration.
|
587
|
116 |
|
628
|
117 |
<hlm:targetMessage id="diamonds.id" target="diamonds">
|
|
118 |
<hlm:fmppMessage sourceFile="${helium.dir}/tools/common/templates/diamonds/tool.xml.ftl" >
|
|
119 |
<data expandProperties="yes">
|
|
120 |
ant: antProperties()
|
|
121 |
</data>
|
|
122 |
</hlm:fmppMessage>
|
|
123 |
</hlm:targetMessage> |