diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/gl_objects/builds.py | 8 | ||||
-rw-r--r-- | docs/gl_objects/builds.rst | 16 |
2 files changed, 17 insertions, 7 deletions
diff --git a/docs/gl_objects/builds.py b/docs/gl_objects/builds.py index e125b39..5ca55db 100644 --- a/docs/gl_objects/builds.py +++ b/docs/gl_objects/builds.py @@ -1,13 +1,16 @@ # var list -variables = project.variables.list() +p_variables = project.variables.list() +g_variables = group.variables.list() # end var list # var get -var = project.variables.get(var_key) +p_var = project.variables.get(var_key) +g_var = group.variables.get(var_key) # end var get # var create var = project.variables.create({'key': 'key1', 'value': 'value1'}) +var = group.variables.create({'key': 'key1', 'value': 'value1'}) # end var create # var update @@ -17,6 +20,7 @@ var.save() # var delete project.variables.delete(var_key) +group.variables.delete(var_key) # or var.delete() # end var delete diff --git a/docs/gl_objects/builds.rst b/docs/gl_objects/builds.rst index 52bdb1a..1c95eb1 100644 --- a/docs/gl_objects/builds.rst +++ b/docs/gl_objects/builds.rst @@ -56,11 +56,11 @@ Remove a trigger: :start-after: # trigger delete :end-before: # end trigger delete -Project variables -================= +Projects and groups variables +============================= -You can associate variables to projects to modify the build/job script -behavior. +You can associate variables to projects and groups to modify the build/job +scripts behavior. Reference --------- @@ -70,6 +70,9 @@ Reference + :class:`gitlab.v4.objects.ProjectVariable` + :class:`gitlab.v4.objects.ProjectVariableManager` + :attr:`gitlab.v4.objects.Project.variables` + + :class:`gitlab.v4.objects.GroupVariable` + + :class:`gitlab.v4.objects.GroupVariableManager` + + :attr:`gitlab.v4.objects.Group.variables` * v3 API @@ -78,7 +81,10 @@ Reference + :attr:`gitlab.v3.objects.Project.variables` + :attr:`gitlab.Gitlab.project_variables` -* GitLab API: https://docs.gitlab.com/ce/api/project_level_variables.html +* GitLab API + + + https://docs.gitlab.com/ce/api/project_level_variables.html + + https://docs.gitlab.com/ce/api/group_level_variables.html Examples -------- |