Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac123df

Browse files
author
Gauvain Pocentek
committed
Add docs for pipeline schedules
1 parentd416238 commitac123df

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

‎docs/gl_objects/builds.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,66 @@ Remove a trigger:
102102
:start-after: # trigger delete
103103
:end-before: # end trigger delete
104104

105+
Pipeline schedule
106+
=================
107+
108+
You can schedule pipeline runs using a cron-like syntax. Variables can be
109+
associated with the scheduled pipelines.
110+
111+
Reference
112+
---------
113+
114+
* v4 API
115+
116+
+:class:`gitlab.v4.objects.ProjectPipelineSchedule`
117+
+:class:`gitlab.v4.objects.ProjectPipelineScheduleManager`
118+
+:attr:`gitlab.v4.objects.Project.pipelineschedules`
119+
+:class:`gitlab.v4.objects.ProjectPipelineScheduleVariable`
120+
+:class:`gitlab.v4.objects.ProjectPipelineScheduleVariableManager`
121+
+:attr:`gitlab.v4.objects.Project.pipelineschedules`
122+
123+
* GitLab API: https://docs.gitlab.com/ce/api/pipeline_schedules.html
124+
125+
Examples
126+
--------
127+
128+
List pipeline schedules::
129+
130+
scheds = project.pipelineschedules.list()
131+
132+
Get a single schedule::
133+
134+
sched = projects.pipelineschedules.get(schedule_id)
135+
136+
Create a new schedule::
137+
138+
sched = project.pipelineschedules.create({
139+
'ref': 'master',
140+
'description': 'Daily test',
141+
'cron': '0 1 * * *'})
142+
143+
Update a schedule::
144+
145+
sched.cron = '1 2 * * *'
146+
sched.save()
147+
148+
Delete a schedule::
149+
150+
sched.delete()
151+
152+
Create a schedule variable::
153+
154+
var = sched.variables.create({'key': 'foo', 'value': 'bar'})
155+
156+
Edit a schedule variable::
157+
158+
var.value = 'new_value'
159+
var.save()
160+
161+
Delete a schedule variable::
162+
163+
var.delete()
164+
105165
Projects and groups variables
106166
=============================
107167

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp