summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/gl_objects/builds.rst52
-rw-r--r--docs/gl_objects/projects.py20
-rw-r--r--docs/gl_objects/projects.rst54
3 files changed, 49 insertions, 77 deletions
diff --git a/docs/gl_objects/builds.rst b/docs/gl_objects/builds.rst
index 9d68736..aebe16f 100644
--- a/docs/gl_objects/builds.rst
+++ b/docs/gl_objects/builds.rst
@@ -1,10 +1,56 @@
-###############################
-Jobs (v4 API) / Builds (v3 API)
-###############################
+##########################
+Pipelines, Builds and Jobs
+##########################
Build and job are two classes representing the same object. Builds are used in
v3 API, jobs in v4 API.
+Project pipelines
+=================
+
+A pipeline is a group of jobs executed by GitLab CI.
+
+Reference
+---------
+
+* v4 API:
+
+ + :class:`gitlab.v4.objects.ProjectPipeline`
+ + :class:`gitlab.v4.objects.ProjectPipelineManager`
+ + :attr:`gitlab.v4.objects.Project.pipelines`
+
+* v3 API:
+
+ + :class:`gitlab.v3.objects.ProjectPipeline`
+ + :class:`gitlab.v3.objects.ProjectPipelineManager`
+ + :attr:`gitlab.v3.objects.Project.pipelines`
+ + :attr:`gitlab.Gitlab.project_pipelines`
+
+* GitLab API: https://docs.gitlab.com/ce/api/pipelines.html
+
+Examples
+--------
+
+List pipelines for a project::
+
+ pipelines = project.pipelines.list()
+
+Get a pipeline for a project::
+
+ pipeline = project.pipelines.get(pipeline_id)
+
+Create a pipeline for a particular reference::
+
+ pipeline = project.pipelines.create({'ref': 'master'})
+
+Retry the failed builds for a pipeline::
+
+ pipeline.retry()
+
+Cancel builds in a pipeline::
+
+ pipeline.cancel()
+
Triggers
========
diff --git a/docs/gl_objects/projects.py b/docs/gl_objects/projects.py
index a633ee8..1b0a6b9 100644
--- a/docs/gl_objects/projects.py
+++ b/docs/gl_objects/projects.py
@@ -321,26 +321,6 @@ service.save()
service.delete()
# end service delete
-# pipeline list
-pipelines = project.pipelines.list()
-# end pipeline list
-
-# pipeline get
-pipeline = project.pipelines.get(pipeline_id)
-# end pipeline get
-
-# pipeline create
-pipeline = project.pipelines.create({'ref': 'master'})
-# end pipeline create
-
-# pipeline retry
-pipeline.retry()
-# end pipeline retry
-
-# pipeline cancel
-pipeline.cancel()
-# end pipeline cancel
-
# boards list
boards = project.boards.list()
# end boards list
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst
index 0c556f4..b39c73b 100644
--- a/docs/gl_objects/projects.rst
+++ b/docs/gl_objects/projects.rst
@@ -604,60 +604,6 @@ Delete a project hook:
:start-after: # hook delete
:end-before: # end hook delete
-Project pipelines
-=================
-
-Reference
----------
-
-* v4 API:
-
- + :class:`gitlab.v4.objects.ProjectPipeline`
- + :class:`gitlab.v4.objects.ProjectPipelineManager`
- + :attr:`gitlab.v4.objects.Project.pipelines`
-
-* v3 API:
-
- + :class:`gitlab.v3.objects.ProjectPipeline`
- + :class:`gitlab.v3.objects.ProjectPipelineManager`
- + :attr:`gitlab.v3.objects.Project.pipelines`
- + :attr:`gitlab.Gitlab.project_pipelines`
-
-* GitLab API: https://docs.gitlab.com/ce/api/pipelines.html
-
-Examples
---------
-
-List pipelines for a project:
-
-.. literalinclude:: projects.py
- :start-after: # pipeline list
- :end-before: # end pipeline list
-
-Get a pipeline for a project:
-
-.. literalinclude:: projects.py
- :start-after: # pipeline get
- :end-before: # end pipeline get
-
-Retry the failed builds for a pipeline:
-
-.. literalinclude:: projects.py
- :start-after: # pipeline retry
- :end-before: # end pipeline retry
-
-Cancel builds in a pipeline:
-
-.. literalinclude:: projects.py
- :start-after: # pipeline cancel
- :end-before: # end pipeline cancel
-
-Create a pipeline for a particular reference:
-
-.. literalinclude:: projects.py
- :start-after: # pipeline create
- :end-before: # end pipeline create
-
Project Services
================