Skip to content

Commit

Permalink
Project pipeline jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlq committed Nov 13, 2017
1 parent 34e32a0 commit b861837
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions gitlab/v4/objects.py
Expand Up @@ -1706,7 +1706,23 @@ def raw(self, file_path, ref, streamed=False, action=None, chunk_size=1024,
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):
Expand Down

0 comments on commit b861837

Please sign in to comment.