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
|
|
14 |
to configure diamonds in helium.
|
|
15 |
|
|
16 |
Diamonds Server setup
|
|
17 |
---------------------
|
|
18 |
Please define ``diamonds.host`` property with server address and ``diamonds.port`` with server port number.
|
|
19 |
e. g. ::
|
|
20 |
|
|
21 |
<!-- Diamonds server details -->
|
|
22 |
<property name="diamonds.host" value="diamonds.xxx.com"/>
|
|
23 |
<property name="diamonds.port" value="9900"/>
|
|
24 |
|
|
25 |
|
|
26 |
Initialize diamonds
|
|
27 |
-------------------
|
|
28 |
`diamonds` target is the initialize target for diamonds logging. Call diamonds target in build target sequence
|
|
29 |
and this will log the already available data to diamonds and continue to log data onward as soon as they are available.
|
|
30 |
This is done already in helium build target sequence. So user can ignore this section.
|
|
31 |
|
|
32 |
Disable diamonds logging
|
|
33 |
-------------------------------
|
|
34 |
Diamonds logging can be skipped by defining the property ``skip.diamonds`` to true.
|
|
35 |
e.g.::
|
|
36 |
|
|
37 |
hlm -Dskip.diamonds=true
|
|
38 |
|
|
39 |
|
|
40 |
Add targets into diamonds configuration ftl file
|
|
41 |
------------------------------------------------
|
|
42 |
Diamonds detail configurations are in helium/config/diamonds_config.xml.ftl file.
|
|
43 |
User have to add target here(this target must be already defined in configuration)
|
|
44 |
if they want to log some additional data to diamonds after the target execution.
|
|
45 |
|
|
46 |
Define the target with the following attributes inside ``<targets>`` node:
|
|
47 |
|
|
48 |
.. csv-table:: Target
|
|
49 |
:header: "Attribute", "Description", "Required"
|
|
50 |
|
|
51 |
"name", "Name of the target","Yes"
|
|
52 |
"template-file", "template file to process the data","No, if not defined, consider template file name same as target name"
|
|
53 |
"logfile", "log file which will be processed","No"
|
|
54 |
"ant-properties","set true if you need values from ant properties, default is false","No"
|
|
55 |
"defer", "logging will be deferred and will be logged at the build finish time. Default is false","No"
|
|
56 |
|
|
57 |
e.g
|
|
58 |
|
|
59 |
.. code-block:: xml
|
|
60 |
|
|
61 |
<target name="check-tool-dependencies" template-file="tool.xml.ftl" logfile="${ant['temp.build.dir']}/build/doc/ivy/tool-dependencies-${ant['build.type']}.xml" ant-properties="true" defer="true"/>
|
|
62 |
|
|
63 |
|
|
64 |
If no logfile provided, looks for xml file to send using <build.id_target_name.xml> file or <target_name.xml> file,
|
|
65 |
if both doesn't exists does nothing. tries to pass ant properties and sends it. For below example, it looks for
|
|
66 |
<build.id_create-bom.xml> or create_bom.xml and if any one exists then it will send that data.
|
|
67 |
|
|
68 |
::
|
|
69 |
|
|
70 |
<target name="create-bom"/>
|
|
71 |
|
|
72 |
|
|
73 |
Using only ant properties for a specific target to send data
|
|
74 |
|
|
75 |
::
|
|
76 |
|
|
77 |
<target name="ant-prop-target" template-file="ant-prop.xml.ftl" ant-properties="true"/>
|
|
78 |
|