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

Appearance settings

Commit d416238

Browse filesBrowse files
author
Gauvain Pocentek
committed
Move the pipelines doc to builds.rst
1 parent 0cbd9c6 commit d416238
Copy full SHA for d416238

File tree

Expand file treeCollapse file tree

3 files changed

+49
-77
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+49
-77
lines changed
Open diff view settings
Collapse file

‎docs/gl_objects/builds.rst‎

Copy file name to clipboardExpand all lines: docs/gl_objects/builds.rst
+49-3Lines changed: 49 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,56 @@
1-
###############################
2-
Jobs (v4 API) / Builds (v3 API)
3-
###############################
1+
##########################
2+
Pipelines, Builds and Jobs
3+
##########################
44

55
Build and job are two classes representing the same object. Builds are used in
66
v3 API, jobs in v4 API.
77

8+
Project pipelines
9+
=================
10+
11+
A pipeline is a group of jobs executed by GitLab CI.
12+
13+
Reference
14+
---------
15+
16+
* v4 API:
17+
18+
+ :class:`gitlab.v4.objects.ProjectPipeline`
19+
+ :class:`gitlab.v4.objects.ProjectPipelineManager`
20+
+ :attr:`gitlab.v4.objects.Project.pipelines`
21+
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+
* GitLab API: https://docs.gitlab.com/ce/api/pipelines.html
30+
31+
Examples
32+
--------
33+
34+
List pipelines for a project::
35+
36+
pipelines = project.pipelines.list()
37+
38+
Get a pipeline for a project::
39+
40+
pipeline = project.pipelines.get(pipeline_id)
41+
42+
Create a pipeline for a particular reference::
43+
44+
pipeline = project.pipelines.create({'ref': 'master'})
45+
46+
Retry the failed builds for a pipeline::
47+
48+
pipeline.retry()
49+
50+
Cancel builds in a pipeline::
51+
52+
pipeline.cancel()
53+
854
Triggers
955
========
1056

Collapse file

‎docs/gl_objects/projects.py‎

Copy file name to clipboardExpand all lines: docs/gl_objects/projects.py
-20Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -321,26 +321,6 @@
321321
service.delete()
322322
# end service delete
323323

324-
# pipeline list
325-
pipelines = project.pipelines.list()
326-
# end pipeline list
327-
328-
# pipeline get
329-
pipeline = project.pipelines.get(pipeline_id)
330-
# end pipeline get
331-
332-
# pipeline create
333-
pipeline = project.pipelines.create({'ref': 'master'})
334-
# end pipeline create
335-
336-
# pipeline retry
337-
pipeline.retry()
338-
# end pipeline retry
339-
340-
# pipeline cancel
341-
pipeline.cancel()
342-
# end pipeline cancel
343-
344324
# boards list
345325
boards = project.boards.list()
346326
# end boards list
Collapse file

‎docs/gl_objects/projects.rst‎

Copy file name to clipboardExpand all lines: docs/gl_objects/projects.rst
-54Lines changed: 0 additions & 54 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -604,60 +604,6 @@ Delete a project hook:
604604
:start-after: # hook delete
605605
:end-before: # end hook delete
606606

607-
Project pipelines
608-
=================
609-
610-
Reference
611-
---------
612-
613-
* v4 API:
614-
615-
+ :class:`gitlab.v4.objects.ProjectPipeline`
616-
+ :class:`gitlab.v4.objects.ProjectPipelineManager`
617-
+ :attr:`gitlab.v4.objects.Project.pipelines`
618-
619-
* v3 API:
620-
621-
+ :class:`gitlab.v3.objects.ProjectPipeline`
622-
+ :class:`gitlab.v3.objects.ProjectPipelineManager`
623-
+ :attr:`gitlab.v3.objects.Project.pipelines`
624-
+ :attr:`gitlab.Gitlab.project_pipelines`
625-
626-
* GitLab API: https://docs.gitlab.com/ce/api/pipelines.html
627-
628-
Examples
629-
--------
630-
631-
List pipelines for a project:
632-
633-
.. literalinclude:: projects.py
634-
:start-after: # pipeline list
635-
:end-before: # end pipeline list
636-
637-
Get a pipeline for a project:
638-
639-
.. literalinclude:: projects.py
640-
:start-after: # pipeline get
641-
:end-before: # end pipeline get
642-
643-
Retry the failed builds for a pipeline:
644-
645-
.. literalinclude:: projects.py
646-
:start-after: # pipeline retry
647-
:end-before: # end pipeline retry
648-
649-
Cancel builds in a pipeline:
650-
651-
.. literalinclude:: projects.py
652-
:start-after: # pipeline cancel
653-
:end-before: # end pipeline cancel
654-
655-
Create a pipeline for a particular reference:
656-
657-
.. literalinclude:: projects.py
658-
:start-after: # pipeline create
659-
:end-before: # end pipeline create
660-
661607
Project Services
662608
================
663609

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.