summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2018-11-03 15:22:50 +0100
committerGitHub <noreply@github.com>2018-11-03 15:22:50 +0100
commitfcce7a316968a9aea7aa504730cea1734c2f897a (patch)
treecef579e3f37abb7fffca87fce8a894b05ed3506a
parentbc6ce047959a57e58e8260b41556f29b3da27da4 (diff)
parentf7fbfca7e6a32a31dbf7ca8e1d4f83b34b7ac9db (diff)
downloadgitlab-fcce7a316968a9aea7aa504730cea1734c2f897a.tar.gz
Merge pull request #619 from python-gitlab/issue/595
[docs] Add an example of pipeline schedule vars listing
-rw-r--r--docs/gl_objects/builds.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/gl_objects/builds.rst b/docs/gl_objects/builds.rst
index 51e7496..ee45090 100644
--- a/docs/gl_objects/builds.rst
+++ b/docs/gl_objects/builds.rst
@@ -141,6 +141,13 @@ Delete a schedule::
sched.delete()
+List schedule variables::
+
+ # note: you need to use get() to retrieve the schedule variables. The
+ # attribute is not present in the response of a list() call
+ sched = projects.pipelineschedules.get(schedule_id)
+ vars = sched.attributes['variables']
+
Create a schedule variable::
var = sched.variables.create({'key': 'foo', 'value': 'bar'})