summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorMoritz Lipp <moritz.lipp@iaik.tugraz.at>2017-10-13 14:17:40 +0200
committerMoritz Lipp <github@mlq.me>2017-11-13 15:12:40 +0100
commitb861837b25bb45dbe40b035dff5f41898450e22b (patch)
treec45bbb218f8dc6aab8e62762057071c2df7f3cff /gitlab/v4/objects.py
parent34e32a0944b65583a57b97bf0124b8935ab49fa7 (diff)
downloadgitlab-b861837b25bb45dbe40b035dff5f41898450e22b.tar.gz
Project pipeline jobs
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py16
1 files changed, 16 insertions, 0 deletions
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):