Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.82 KB

gitlab_status.rst

File metadata and controls

36 lines (24 loc) · 1.82 KB
.. bb:reporter:: GitLabStatusPush

GitLabStatusPush

.. py:currentmodule:: buildbot.reporters.gitlab

from buildbot.plugins import reporters

gl = reporters.GitLabStatusPush('private-token', context='continuous-integration/buildbot',
                                baseURL='https://git.yourcompany.com')
c['services'].append(gl)

:class:`GitLabStatusPush` publishes build status using GitLab Commit Status API. The build status is published to a specific commit SHA in GitLab.

It requires `txrequests`_ package to allow interaction with GitLab Commit Status API.

It uses private token auth, and the token owner is required to have at least developer access to each repository. As a result, we recommend you use https in your base_url rather than http.

.. py:class:: GitLabStatusPush(token, context=None, baseURL=None, generators=None, verbose=False)

    :param string token: Private token of user permitted to update status for commits. (can be a :ref:`Secret`)
    :param string context: Name of your build system, eg. continuous-integration/buildbot
    :type generators: list of IReportGenerator instances
    :param generators: A list of report generators that will be used to generate reports to be sent by this reporter.
        Currently the reporter will consider only the report generated by the first generator.
    :param string baseURL: the base url of the GitLab host, up to and optionally including the first `/` of the path. Do not include /api/
    :param string verbose: Be more verbose
    :param boolean verify: disable ssl verification for the case you use temporary self signed certificates
    :param boolean debug: logs every requests and their response

    .. _txrequests: https://pypi.python.org/pypi/txrequests