diff options
author | Alex Zirka <you@example.com> | 2020-10-07 20:36:00 +0300 |
---|---|---|
committer | Alex Zirka <you@example.com> | 2020-10-07 20:36:00 +0300 |
commit | 05cbdc224007e9dda10fc2f6f7d63c82cf36dec0 (patch) | |
tree | 2bcca29542f77200419b62d63661ec61c022b646 | |
parent | 40ec2f528b885290fbb3e2d7ef0f5f8615219326 (diff) | |
download | gitlab-05cbdc224007e9dda10fc2f6f7d63c82cf36dec0.tar.gz |
feat: added support for pipeline bridges
-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"), ) |