Package bitten :: Module recipe :: Class Recipe

Class Recipe

object --+
         |
        Recipe

A build recipe.

Iterate over this object to get the individual build steps in the order they have been defined in the recipe file.

Instance Methods
 
__init__(self, xml, basedir='/Users/simon/dev/projects/bitten/repos/bitten-0.6', config=None)
Create the recipe.
 
__iter__(self)
Iterate over the individual steps of the recipe.
 
validate(self)
Validate the recipe.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  ERROR = 'error'
  LOG = 'log'
  REPORT = 'report'
  ATTACH = 'attach'
Properties

Inherited from object: __class__

Method Details

__init__(self, xml, basedir='/Users/simon/dev/projects/bitten/repos/bitten-0.6', config=None)
(Constructor)

 
Create the recipe.
Parameters:
  • xml (ParsedElement) - the XML document representing the recipe
  • basedir - the base directory for the build
  • config (Configuration) - the slave configuration (optional)
Overrides: object.__init__

validate(self)

 

Validate the recipe.

This method checks a number of constraints:
  • the name of the root element must be "build"
  • the only permitted child elements or the root element with the name "step"
  • the recipe must contain at least one step
  • step elements must have a unique "id" attribute
  • a step must contain at least one nested command
  • commands must not have nested content
Raises: