File tree 2 files changed +18
-1
lines changed
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::
29
29
30
30
pipeline = project.pipelines.get(pipeline_id)
31
31
32
+ Get variables of a pipeline::
33
+
34
+ variables = pipeline.variables.list()
35
+
32
36
Create a pipeline for a particular reference::
33
37
34
38
pipeline = project.pipelines.create({'ref': 'master'})
Original file line number Diff line number Diff line change @@ -3100,8 +3100,21 @@ class ProjectPipelineJobManager(ListMixin, RESTManager):
3100
3100
_list_filters = ("scope" ,)
3101
3101
3102
3102
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
+
3103
3113
class ProjectPipeline (RESTObject , RefreshMixin , ObjectDeleteMixin ):
3104
- _managers = (("jobs" , "ProjectPipelineJobManager" ),)
3114
+ _managers = (
3115
+ ("jobs" , "ProjectPipelineJobManager" ),
3116
+ ("variables" , "ProjectPipelineVariableManager" ),
3117
+ )
3105
3118
3106
3119
@cli .register_custom_action ("ProjectPipeline" )
3107
3120
@exc .on_http_error (exc .GitlabPipelineCancelError )
You can’t perform that action at this time.
0 commit comments