Dashboard > Pulse v2.0 > ... > Agents > Resource Repository
  Pulse v2.0 Log In | Sign Up   View a printable version of the current page.  
  Resource Repository
Added by Jason Sankey, last edited by Jason Sankey on Nov 20, 2008  (view change)
Labels: 
(None)

Pulse Manual Index

Overview

The resource repository for each pulse™ agent is where you can view and edit the resources for that agent. The repository is found nested in the "resources" item in the agent's configuration found in the "administration" of the web interface.

Purpose of Resources

Resources are used to describe external requirements for executing builds. Examples of resources include:

  • The Apache Ant build tool, perhaps a specific verion.
  • A specific version of the Linux kernel, for builds targetted at that kernel.
  • A runtime library required to execute the tests for the build.

By adding a resource to the repository on an agent, you can indicate that the resource exists on that server. Additionally, you configure properties for the resource (or specific versions of the resource), and those properties may be accessed when processing recipes. Properties can influence the build in multiple ways:

  1. by introduction into the environment: e.g. you can introduce a property named "JAVA_HOME" into the environment to test against a specific JDK.
  2. by influencing the search path: e.g. you can create a property "ant.bin.dir" which can be added to pulse's executable search path to test using a specific version of Ant
  3. by implicit references from certain commands: e.g. the ant command will look for a resource named "ant"
  4. by explicit references in pulse files

Resources allow you to abstract the specific loction of a required resource on different agents, and to test against multiple versions of various dependencies.

Accessing Resource Properties

Resource properties are accessed by importing a resource (or a specific version of a resource) as part of a build. There are two ways to import resources:

When a resource is imported, all global properties for the resource are always introduced. The properties may also be added to the environment and executable search path if so configured. When a specific resource version is imported, the properties for that version are introduced in addition to the global properties. Properties defined in both the globals and specific version will take on the value in the specific version. If no version is specified, and a version is marked as the default, the properties for the default version are introduced. Resources may be configured without a default version, in which case omitting the version on import will result in only the global properties being introduced.

For built-in projects, resources may be implicitly referenced (i.e. without being imported). For example, an ant project will import a resource named "ant" (if it exists) and the ant command will use a property named "ant.bin" if it exists. Thus to control the ant binary used by an ant project, you can define a resource named "ant" with a property named "ant.bin". For full details on how each type of built-in project interacts with the resource repository, refer to the page for the specific project type.

Adding Resources

To create a new resource, navigate to the "resources" tree item on the configuration view for the appropriate agent and click the "add" link at the bottom of the "resources" table.

Resource Auto-Discovery

Note that when a pulse™ server starts, it may automatically detect resources installed on the host machine. Refer to Resource Auto-Discovery for details.

Managing Resources

Default Version

Note that you can specify a default version for a resource. If no version is specified when the resource is imported, the default version will be used. Otherwise, only the global properties will be imported.

Note that built-in projects always import the default version of a resource.

Property Names

Some conventions are used for property names, particularly those used by built-in projects and some commands (such as ant). In particular, property names:

  • should use the "." character as a word separator
  • should end in ".bin" when referring to a binary
  • should end in ".dir" when referring to a directory path

These conventions are not enforced, but following them is recommended.

Zutubi wiki is Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators