Skip to content

Commit

Permalink
SlaveInfo: doc in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredgrubb committed Dec 8, 2013
1 parent 3bd12ed commit ffd92e2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
33 changes: 33 additions & 0 deletions master/docs/manual/cfg-buildsteps.rst
Expand Up @@ -3079,6 +3079,39 @@ Note that this step requires that the Buildslave be at least version 0.8.3.
For previous versions, no environment variables are available (the slave
environment will appear to be empty).

.. _Setting-Buildslave-Info:

Setting Buildslave Info
-----------------------

Each buildslave has a dictionary of properties (the "buildslave info dictionary") that is persisted into the database.
This info dictionary is displayed on the "buildslave" web page and is available in Interpolate operations.

.. bb:step:: SetSlaveInfo
.. _Step-SetSlaveInfo:

SetSlaveInfo
++++++++++++

.. py:class:: buildbot.steps.master.SetSlaveInfo
``SetSlaveInfo`` is a base class to provide a facility to set values in the buildslave info dictionary.
For example::

from buildbot.steps.master import SetSlaveInfo

class SetSlaveFromPropInfo(SetSlaveInfo):
name = "SetSlaveFromPropInfo"

# override this to return the dictionary update
def getSlaveInfoUpdate(self):
# for example, copy a property into the buildslave dict
update = {
"foo": self.getProperty("foo")
}
return update


.. index:: Properties; triggering schedulers

Expand Down
4 changes: 4 additions & 0 deletions master/docs/manual/cfg-properties.rst
Expand Up @@ -210,6 +210,10 @@ The following selectors are supported.
``kw``
The key refers to a keyword argument passed to ``Interpolate``.

``slave``
The key to the per-buildslave "info" dictionary (e.g., the "Slave information" properties shown
in the buildslave web page for each buildslave)

The following ways of interpreting the value are available.

``-replacement``
Expand Down
2 changes: 2 additions & 0 deletions master/docs/relnotes/index.rst
Expand Up @@ -129,6 +129,8 @@ Features

* A new :bb:step:`MultipleFileUpload` step was added to allow uploading several files (or directories) in a single step.

* Buildslave info can now be retrieved via :ref:`Interpolate` and a new :bb:step:`SetSlaveInfo` buildstep.

Fixes
~~~~~

Expand Down

0 comments on commit ffd92e2

Please sign in to comment.