"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/manual/customization.rst" between
buildbot-3.0.2.tar.gz and buildbot-3.1.0.tar.gz

About: Buildbot is a continuous integration testing framework (Python-based). It supports also automation of complex build systems, application deployment, and management of sophisticated software-release processes.

customization.rst  (buildbot-3.0.2):customization.rst  (buildbot-3.1.0)
skipping to change at line 117 skipping to change at line 117
return False return False
c['collapseRequests'] = collapseRequests c['collapseRequests'] = collapseRequests
Another common example is to prevent collapsing of requests coming from a :bb:st ep:`Trigger` step. Another common example is to prevent collapsing of requests coming from a :bb:st ep:`Trigger` step.
:bb:step:`Trigger` step can indeed be used in order to implement parallel testin g of the same source. :bb:step:`Trigger` step can indeed be used in order to implement parallel testin g of the same source.
Buildrequests will all have the same sourcestamp, but probably different propert ies, and shall not be collapsed. Buildrequests will all have the same sourcestamp, but probably different propert ies, and shall not be collapsed.
.. note:: .. note::
In most of the cases, just setting collapseRequests=False for triggered buil ders will do the trick. In most cases, just setting ``collapseRequests=False`` for triggered builder s will do the trick.
In other cases, ``parent_buildid`` from buildset can be used: In other cases, ``parent_buildid`` from buildset can be used:
.. code-block:: python .. code-block:: python
@defer.inlineCallbacks @defer.inlineCallbacks
def collapseRequests(master, builder, req1, req2): def collapseRequests(master, builder, req1, req2):
canBeCollapsed = yield buildrequest.BuildRequest.canBeCollapsed(master, req1, req2) canBeCollapsed = yield buildrequest.BuildRequest.canBeCollapsed(master, req1, req2)
selfBuildset , otherBuildset = yield defer.gatherResults([ selfBuildset , otherBuildset = yield defer.gatherResults([
master.data.get(('buildsets', req1['buildsetid'])), master.data.get(('buildsets', req1['buildsetid'])),
skipping to change at line 174 skipping to change at line 174
The :bb:cfg:`prioritizeBuilders` configuration key specifies a function which is called with two arguments: a :class:`BuildMaster` and a list of :class:`Builder ` objects. The :bb:cfg:`prioritizeBuilders` configuration key specifies a function which is called with two arguments: a :class:`BuildMaster` and a list of :class:`Builder ` objects.
It should return a list of the same :class:`Builder` objects, in the desired ord er. It should return a list of the same :class:`Builder` objects, in the desired ord er.
It may also remove items from the list if builds should not be started on those builders. It may also remove items from the list if builds should not be started on those builders.
If necessary, this function can return its results via a Deferred (it is called with ``maybeDeferred``). If necessary, this function can return its results via a Deferred (it is called with ``maybeDeferred``).
A simple ``prioritizeBuilders`` implementation might look like this: A simple ``prioritizeBuilders`` implementation might look like this:
.. code-block:: python .. code-block:: python
def prioritizeBuilders(buildmaster, builders): def prioritizeBuilders(buildmaster, builders):
"""Prioritize builders. 'finalRelease' builds have the highest """Prioritize builders. 'finalRelease' builds have the highest
priority, so they should be built before running tests, or priority, so they should be built before running tests, or
creating builds.""" creating builds."""
builderPriorities = { builderPriorities = {
"finalRelease": 0, "finalRelease": 0,
"test": 1, "test": 1,
"build": 2, "build": 2,
} }
builders.sort(key=lambda b: builderPriorities.get(b.name, 0)) builders.sort(key=lambda b: builderPriorities.get(b.name, 0))
return builders return builders
skipping to change at line 1205 skipping to change at line 1205
- This plugin can use any WSGI compatible web framework, Flask_ is a very common one, Bottle_ is another popular option. - This plugin can use any WSGI compatible web framework, Flask_ is a very common one, Bottle_ is another popular option.
- The application needs to implement a ``/index.html`` route, which will render the html code representing the dashboard. - The application needs to implement a ``/index.html`` route, which will render the html code representing the dashboard.
- The application framework runs in a thread outside of Twisted. - The application framework runs in a thread outside of Twisted.
No need to worry about Twisted and asynchronous code. No need to worry about Twisted and asynchronous code.
You can use python-requests_ or any library from the python ecosystem to acces s other servers. You can use python-requests_ or any library from the python ecosystem to acces s other servers.
- You could use HTTP in order to access Buildbot :ref:`REST_API`, but you can al so use the :ref:`Data_API`, via the provided synchronous wrapper. - You could use HTTP in order to access Buildbot :ref:`REST_API`, but you can al so use the :ref:`Data_API`, via the provided synchronous wrapper.
.. py:method:: buildbot_api.dataGet(path, filters=None, fields=None, order=N one, limit=None, offset=None): .. py:method:: buildbot_api.dataGet(path, filters=None, fields=None, order=N one, limit=None, offset=None)
:param tuple path: A tuple of path elements representing the API path to fetch. :param tuple path: A tuple of path elements representing the API path to fetch.
Numbers can be passed as strings or integers. Numbers can be passed as strings or integers.
:param filters: result spec filters :param filters: result spec filters
:param fields: result spec fields :param fields: result spec fields
:param order: result spec order :param order: result spec order
:param limit: result spec limit :param limit: result spec limit
:param offset: result spec offset :param offset: result spec offset
:raises: :py:exc:`~buildbot.data.exceptions.InvalidPathError` :raises: :py:exc:`~buildbot.data.exceptions.InvalidPathError`
:returns: a resource or list, or None :returns: a resource or list, or None
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)