- Notifications
You must be signed in to change notification settings - Fork673
add "list pipeline jobs" handler#378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
as described here:https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobsexample:`jobs = pipeline.jobs.list()`
c4b595b
to2848455
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thnk you for this MR!
Could you have a look at the comments?
@@ -1764,6 +1768,12 @@ def create(self, data, **kwargs): | |||
return CreateMixin.create(self, data, path=path, **kwargs) | |||
class PipelineJobManager(ListMixin, RESTManager): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Since you can list and get jobs, you should use aRetrieveMixin
here.
@@ -1764,6 +1768,12 @@ def create(self, data, **kwargs): | |||
return CreateMixin.create(self, data, path=path, **kwargs) | |||
class PipelineJobManager(ListMixin, RESTManager): | |||
_path = '/projects/%(project_id)s/pipelines/%(pipeline_id)s/jobs' | |||
_obj_cls = ProjectJob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Although this seems to be a good idea to use a ProjectJob, things get a bit more complicated than expected when using the CLI. To avoid bad surprises I try to stick to the upstream API logic: we are requesting a different URL so we get a different object class.
Could you create and use aPipelineJob
object class instead?
ahsobhi commentedDec 13, 2017
i was just going to create a pull request for such handler, and it is very useful as well. Thanks to@akaWolf and@gpocentek |
I'm closing this MR since there's been no update, and#413 implements the feature. |
as described here:
https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobs
example:
jobs = pipeline.jobs.list()