buildframework/helium/sf/java/diamonds/diamonds.rst
author kelvzhu
Wed, 14 Jul 2010 16:22:24 +0800
changeset 613 839712f5a78c
parent 587 85df38eb4012
child 628 7c4a911dc066
permissions -rw-r--r--
fixed defect 1412
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     1
.. index::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     2
  module: Configuring Diamonds
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     3
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     4
====================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
Configuring Diamonds
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     6
====================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     7
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     8
.. contents::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     9
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    10
Introduction
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    11
------------
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    12
Diamonds is web application that can collect all build related information and categorize
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    13
builds. It can represent build information in different metrics. This document describes how
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    14
to configure diamonds in helium.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    15
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    16
Diamonds Server setup
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    17
---------------------
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    18
Please define ``diamonds.host`` property with server address and ``diamonds.port`` with server port number.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    19
e. g. ::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    20
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    21
    <!-- Diamonds server details -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    22
    <property name="diamonds.host" value="diamonds.xxx.com"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    23
    <property name="diamonds.port" value="9900"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
Initialize diamonds
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
-------------------
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    28
`diamonds` target is the initialize target for diamonds logging. Call diamonds target in build target sequence
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
and this will log the already available data to diamonds and continue to log data onward as soon as they are available.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    30
This is done already in helium build target sequence. So user can ignore this section.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    31
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
Disable diamonds logging
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
-------------------------------
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
Diamonds logging can be skipped by defining the property ``skip.diamonds`` to true.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
e.g.::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    36
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    37
    hlm -Dskip.diamonds=true 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
Add targets into diamonds configuration ftl file
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
------------------------------------------------
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    42
Diamonds detail configurations are in helium/config/diamonds_config.xml.ftl file.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
User have to add target here(this target must be already defined in configuration) 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
if they want to log some additional data to diamonds after the target execution.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    45
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    46
Define the target with the following attributes inside ``<targets>`` node:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    47
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    48
.. csv-table:: Target
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    49
   :header: "Attribute", "Description", "Required"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    50
   
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    51
    "name", "Name of the target","Yes"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    52
    "template-file", "template file to process the data","No, if not defined, consider template file name same as target name"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    53
    "logfile", "log file which will be processed","No"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    54
    "ant-properties","set true if you need values from ant properties, default is false","No"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
    "defer", "logging will be deferred and will be logged at the build finish time. Default is false","No"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    56
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    57
e.g
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    58
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    59
.. code-block:: xml
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    60
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    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"/>    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    62
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    63
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    64
If no logfile provided, looks for xml file to send using <build.id_target_name.xml> file or <target_name.xml> file, 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    65
if both doesn't exists does nothing. tries to pass ant properties and sends it. For below example, it looks for 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    66
<build.id_create-bom.xml> or create_bom.xml and if any one exists then it will send that data. 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    67
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    68
::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    69
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    70
    <target name="create-bom"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    71
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    72
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    73
Using only ant properties for a specific target to send data
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    74
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    75
::
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    76
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    77
    <target name="ant-prop-target" template-file="ant-prop.xml.ftl" ant-properties="true"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    78