File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ Get a pipeline for a project::
2929
3030 pipeline = project.pipelines.get(pipeline_id)
3131
32+ Get variables of a pipeline::
33+
34+ variables = pipeline.variables.list()
35+
3236Create a pipeline for a particular reference::
3337
3438 pipeline = project.pipelines.create({'ref': 'master'})
Original file line number Diff line number Diff line change @@ -3100,8 +3100,21 @@ class ProjectPipelineJobManager(ListMixin, RESTManager):
31003100 _list_filters = ("scope" ,)
31013101
31023102
3103+ class ProjectPipelineVariable (RESTObject ):
3104+ _id_attr = "key"
3105+
3106+
3107+ class ProjectPipelineVariableManager (ListMixin , RESTManager ):
3108+ _path = "/projects/%(project_id)s/pipelines/%(pipeline_id)s/variables"
3109+ _obj_cls = ProjectPipelineVariable
3110+ _from_parent_attrs = {"project_id" : "project_id" , "pipeline_id" : "id" }
3111+
3112+
31033113class ProjectPipeline (RESTObject , RefreshMixin , ObjectDeleteMixin ):
3104- _managers = (("jobs" , "ProjectPipelineJobManager" ),)
3114+ _managers = (
3115+ ("jobs" , "ProjectPipelineJobManager" ),
3116+ ("variables" , "ProjectPipelineVariableManager" ),
3117+ )
31053118
31063119 @cli .register_custom_action ("ProjectPipeline" )
31073120 @exc .on_http_error (exc .GitlabPipelineCancelError )
You can’t perform that action at this time.
0 commit comments