From b861837b25bb45dbe40b035dff5f41898450e22b Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Fri, 13 Oct 2017 14:17:40 +0200 Subject: Project pipeline jobs --- gitlab/v4/objects.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gitlab') diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 6a538e1..17e987c 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -1706,7 +1706,23 @@ class ProjectFileManager(GetMixin, CreateMixin, UpdateMixin, DeleteMixin, return utils.response_content(result, streamed, action, chunk_size) +class ProjectPipelineJob(ProjectJob): + pass + + +class ProjectPipelineJobsManager(ListMixin, RESTManager): + _path = '/projects/%(project_id)s/pipelines/%(pipeline_id)s/jobs' + _obj_cls = ProjectPipelineJob + _from_parent_attrs = {'project_id': 'project_id', + 'pipeline_id' : 'id'} + _list_filters = ('scope',) + + class ProjectPipeline(RESTObject): + _managers = ( + ('jobs', 'ProjectPipelineJobsManager'), + ) + @cli.register_custom_action('ProjectPipeline') @exc.on_http_error(exc.GitlabPipelineCancelError) def cancel(self, **kwargs): -- cgit v1.2.1