1
- ##########################
2
- Pipelines, Builds and Jobs
3
- ##########################
4
-
5
- Build and job are two classes representing the same object. Builds are used in
6
- v3 API, jobs in v4 API.
1
+ ##################
2
+ Pipelines and Jobs
3
+ ##################
7
4
8
5
Project pipelines
9
6
=================
@@ -19,13 +16,6 @@ Reference
19
16
+ :class: `gitlab.v4.objects.ProjectPipelineManager `
20
17
+ :attr: `gitlab.v4.objects.Project.pipelines `
21
18
22
- * v3 API:
23
-
24
- + :class: `gitlab.v3.objects.ProjectPipeline `
25
- + :class: `gitlab.v3.objects.ProjectPipelineManager `
26
- + :attr: `gitlab.v3.objects.Project.pipelines `
27
- + :attr: `gitlab.Gitlab.project_pipelines `
28
-
29
19
* GitLab API: https://docs.gitlab.com/ce/api/pipelines.html
30
20
31
21
Examples
@@ -66,13 +56,6 @@ Reference
66
56
+ :class: `gitlab.v4.objects.ProjectTriggerManager `
67
57
+ :attr: `gitlab.v4.objects.Project.triggers `
68
58
69
- * v3 API:
70
-
71
- + :class: `gitlab.v3.objects.ProjectTrigger `
72
- + :class: `gitlab.v3.objects.ProjectTriggerManager `
73
- + :attr: `gitlab.v3.objects.Project.triggers `
74
- + :attr: `gitlab.Gitlab.project_triggers `
75
-
76
59
* GitLab API: https://docs.gitlab.com/ce/api/pipeline_triggers.html
77
60
78
61
Examples
@@ -88,8 +71,7 @@ Get a trigger::
88
71
89
72
Create a trigger::
90
73
91
- trigger = project.triggers.create({}) # v3
92
- trigger = project.triggers.create({'description': 'mytrigger'}) # v4
74
+ trigger = project.triggers.create({'description': 'mytrigger'})
93
75
94
76
Remove a trigger::
95
77
@@ -190,13 +172,6 @@ Reference
190
172
+ :class: `gitlab.v4.objects.GroupVariableManager `
191
173
+ :attr: `gitlab.v4.objects.Group.variables `
192
174
193
- * v3 API
194
-
195
- + :class: `gitlab.v3.objects.ProjectVariable `
196
- + :class: `gitlab.v3.objects.ProjectVariableManager `
197
- + :attr: `gitlab.v3.objects.Project.variables `
198
- + :attr: `gitlab.Gitlab.project_variables `
199
-
200
175
* GitLab API
201
176
202
177
+ https://docs.gitlab.com/ce/api/project_level_variables.html
@@ -232,11 +207,11 @@ Remove a variable::
232
207
# or
233
208
var.delete()
234
209
235
- Builds/ Jobs
236
- ===========
210
+ Jobs
211
+ ====
237
212
238
- Builds/ Jobs are associated to projects, pipelines and commits. They provide
239
- information on the builds/ jobs that have been run, and methods to manipulate
213
+ Jobs are associated to projects, pipelines and commits. They provide
214
+ information on the jobs that have been run, and methods to manipulate
240
215
them.
241
216
242
217
Reference
@@ -248,13 +223,6 @@ Reference
248
223
+ :class: `gitlab.v4.objects.ProjectJobManager `
249
224
+ :attr: `gitlab.v4.objects.Project.jobs `
250
225
251
- * v3 API
252
-
253
- + :class: `gitlab.v3.objects.ProjectJob `
254
- + :class: `gitlab.v3.objects.ProjectJobManager `
255
- + :attr: `gitlab.v3.objects.Project.jobs `
256
- + :attr: `gitlab.Gitlab.project_jobs `
257
-
258
226
* GitLab API: https://docs.gitlab.com/ce/api/jobs.html
259
227
260
228
Examples
@@ -268,32 +236,21 @@ job::
268
236
269
237
List jobs for the project::
270
238
271
- builds = project.builds.list() # v3
272
- jobs = project.jobs.list() # v4
273
-
274
- To list builds for a specific commit, create a
275
- :class: `~gitlab.v3.objects.ProjectCommit ` object and use its
276
- :attr: `~gitlab.v3.objects.ProjectCommit.builds ` method (v3 only)::
277
-
278
- # v3 only
279
- commit = gl.project_commits.get(commit_sha, project_id=1)
280
- builds = commit.builds()
239
+ jobs = project.jobs.list()
281
240
282
241
To list builds for a specific pipeline or get a single job within a specific
283
242
pipeline, create a
284
243
:class: `~gitlab.v4.objects.ProjectPipeline ` object and use its
285
- :attr: `~gitlab.v4.objects.ProjectPipeline.jobs ` method (v4 only) ::
244
+ :attr: `~gitlab.v4.objects.ProjectPipeline.jobs ` method::
286
245
287
- # v4 only
288
246
project = gl.projects.get(project_id)
289
247
pipeline = project.pipelines.get(pipeline_id)
290
248
jobs = pipeline.jobs.list() # gets all jobs in pipeline
291
249
job = pipeline.jobs.get(job_id) # gets one job from pipeline
292
250
293
251
Get a job::
294
252
295
- project.builds.get(build_id) # v3
296
- project.jobs.get(job_id) # v4
253
+ project.jobs.get(job_id)
297
254
298
255
Get the artifacts of a job::
299
256
0 commit comments