diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2018-10-28 10:54:06 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-11-03 09:59:42 +0100 |
commit | f7fbfca7e6a32a31dbf7ca8e1d4f83b34b7ac9db (patch) | |
tree | 2070b71fb186780289b2a8a04642107590866b74 | |
parent | 368a34d6d7a6a8bddc81a4365391d09485005f97 (diff) | |
download | gitlab-issue/595.tar.gz |
[docs] Add an example of pipeline schedule vars listingissue/595
Closes #595
-rw-r--r-- | docs/gl_objects/builds.rst | 7 |
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'}) |