Plugin Data Storage

You are viewing an old version (v. 1) of this page.
The latest version is v. 10, last edited on Mar 11, 2010 (view differences | )
view page history | view next version >>

Besides plugin setting, plugins might need to generate and save data on the fly when the plugin runs, and use the data later. There are two types of plugin data storage: build storage, and configuration storage.

  1. Build storage
    Build storage is used by plugin to store data related to specific build. It is simply a sub directory under the build directory of the server node (refer to glossary chapter in User's Guide for build directory definition). If the build is deleted, its companion build storage will also be deleted. Plugin developer should choose the sub directory name carefully to avoid conflict with other plugins.
    A typical usage of build storage is the artifact plugin: when publishing artifacts for a particular build, the artifact plugin creates a directory named artifacts under the build directory on the server node, and it will copy the specified files into this directory. The plugin will also add a tab to this build, and display these artifacts so they can be selected for download.
  2. Configuration storage
    Configuration storage is used by plugin to store data related to specific configuration, it is simply a sub directory under the configuration directory of server node (refer to glossary chapter in User's Guide for configuration directory definition). If the configuration is deleted, its companion configuration storage will also be deleted. Plugin developer should choose the sub directory name carefully to avoid conflict with other plugins.
    A typical usage of configuration storage is the build statistics plugin: when a build is finished, the statistics plugin collect build metrics, it processes them and it saves the processed results into a sub directory named build-stats under the corresponding configuration directory on server node. It will also add a tab to the configuration statistics page, and display the build statistics charts using the pre-processed data saved in the build-stats directory.
    Please note that it is also possible that a single plugin can use both build and configuration storage. For example, the junit report plugin generates two types of reports: the junit report for specific build, and the junit statistics report for a particular configuration. Data corresponding to build related report are stored in the build storage, and data corresponding to configuration related reports are stored in the configuration storage.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.