buildframework/helium/doc/src/manual/configuringdiamonds.rst
changeset 307 22ecbfc20eb4
parent 215 b61c19d4168d
parent 217 0f5e3a7fb6af
child 308 7830b8253b5a
equal deleted inserted replaced
215:b61c19d4168d 307:22ecbfc20eb4
     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 
       
    60     <target name="check-tool-dependencies" template-file="tool.xml.ftl" 
       
    61     logfile="${ant['temp.build.dir']}/build/doc/ivy/tool-dependencies-${ant['build.type']}.xml" ant-properties="true"
       
    62     defer="true"/>    
       
    63 
       
    64 
       
    65 If no logfile provided, looks for xml file to send using <build.id_target_name.xml> file or <target_name.xml> file, 
       
    66 if both doesn't exists does nothing. tries to pass ant properties and sends it. For below example, it looks for 
       
    67 <build.id_create-bom.xml> or create_bom.xml and if any one exists then it will send that data. 
       
    68 
       
    69 ::
       
    70     
       
    71     <target name="create-bom"/>
       
    72 
       
    73 
       
    74 Using only ant properties for a specific target to send data
       
    75 
       
    76 ::
       
    77     
       
    78     <target name="ant-prop-target" template-file="ant-prop.xml.ftl" ant-properties="true"/>
       
    79