diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2018-02-18 09:54:51 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-02-18 09:55:19 +0100 |
commit | ac123dfe67240f25de52dc445bde93726d5862c1 (patch) | |
tree | 995da3c3d923d45952d7306f9e99a32e8378d629 /docs | |
parent | d416238a73ea9f3b09fd04cbd46eeee2f231a499 (diff) | |
download | gitlab-ac123dfe67240f25de52dc445bde93726d5862c1.tar.gz |
Add docs for pipeline schedules
Diffstat (limited to 'docs')
-rw-r--r-- | docs/gl_objects/builds.rst | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/docs/gl_objects/builds.rst b/docs/gl_objects/builds.rst index aebe16f..2791188 100644 --- a/docs/gl_objects/builds.rst +++ b/docs/gl_objects/builds.rst @@ -102,6 +102,66 @@ Remove a trigger: :start-after: # trigger delete :end-before: # end trigger delete +Pipeline schedule +================= + +You can schedule pipeline runs using a cron-like syntax. Variables can be +associated with the scheduled pipelines. + +Reference +--------- + +* v4 API + + + :class:`gitlab.v4.objects.ProjectPipelineSchedule` + + :class:`gitlab.v4.objects.ProjectPipelineScheduleManager` + + :attr:`gitlab.v4.objects.Project.pipelineschedules` + + :class:`gitlab.v4.objects.ProjectPipelineScheduleVariable` + + :class:`gitlab.v4.objects.ProjectPipelineScheduleVariableManager` + + :attr:`gitlab.v4.objects.Project.pipelineschedules` + +* GitLab API: https://docs.gitlab.com/ce/api/pipeline_schedules.html + +Examples +-------- + +List pipeline schedules:: + + scheds = project.pipelineschedules.list() + +Get a single schedule:: + + sched = projects.pipelineschedules.get(schedule_id) + +Create a new schedule:: + + sched = project.pipelineschedules.create({ + 'ref': 'master', + 'description': 'Daily test', + 'cron': '0 1 * * *'}) + +Update a schedule:: + + sched.cron = '1 2 * * *' + sched.save() + +Delete a schedule:: + + sched.delete() + +Create a schedule variable:: + + var = sched.variables.create({'key': 'foo', 'value': 'bar'}) + +Edit a schedule variable:: + + var.value = 'new_value' + var.save() + +Delete a schedule variable:: + + var.delete() + Projects and groups variables ============================= |