diff options
-rw-r--r-- | docs/gl_objects/pipelines_and_jobs.rst | 24 | ||||
-rw-r--r-- | gitlab/v4/objects/__init__.py | 12 |
2 files changed, 36 insertions, 0 deletions
diff --git a/docs/gl_objects/pipelines_and_jobs.rst b/docs/gl_objects/pipelines_and_jobs.rst index cc4db53..0a3ddb1 100644 --- a/docs/gl_objects/pipelines_and_jobs.rst +++ b/docs/gl_objects/pipelines_and_jobs.rst @@ -302,3 +302,27 @@ Play (trigger) a job:: Erase a job (artifacts and trace):: build_or_job.erase() + + +Pipeline bridges +===================== + +Get a list of bridge jobs (including child pipelines) for a pipeline. + +Reference +--------- + +* v4 API + + + :class:`gitlab.v4.objects.ProjectPipelineBridge` + + :class:`gitlab.v4.objects.ProjectPipelineBridgeManager` + + :attr:`gitlab.v4.objects.ProjectPipeline.bridges` + +* GitLab API: https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-bridges + +Examples +-------- + +List bridges for the pipeline:: + + bridges = pipeline.bridges.list() diff --git a/gitlab/v4/objects/__init__.py b/gitlab/v4/objects/__init__.py index 016caec..3e2ccb2 100644 --- a/gitlab/v4/objects/__init__.py +++ b/gitlab/v4/objects/__init__.py @@ -3778,6 +3778,17 @@ class ProjectPipelineJobManager(ListMixin, RESTManager): _list_filters = ("scope",) +class ProjectPipelineBridge(RESTObject): + pass + + +class ProjectPipelineBridgeManager(ListMixin, RESTManager): + _path = "/projects/%(project_id)s/pipelines/%(pipeline_id)s/bridges" + _obj_cls = ProjectPipelineBridge + _from_parent_attrs = {"project_id": "project_id", "pipeline_id": "id"} + _list_filters = ("scope",) + + class ProjectPipelineVariable(RESTObject): _id_attr = "key" @@ -3791,6 +3802,7 @@ class ProjectPipelineVariableManager(ListMixin, RESTManager): class ProjectPipeline(RESTObject, RefreshMixin, ObjectDeleteMixin): _managers = ( ("jobs", "ProjectPipelineJobManager"), + ("bridges", "ProjectPipelineBridgeManager"), ("variables", "ProjectPipelineVariableManager"), ) |