|
5 | 5 | Build triggers
|
6 | 6 | ==============
|
7 | 7 |
|
8 |
| -Use :class:`~gitlab.objects.ProjectTrigger` objects to manipulate build |
9 |
| -triggers. The :attr:`gitlab.Gitlab.project_triggers` and |
10 |
| -:attr:`gitlab.objects.Project.triggers` manager objects provide helper |
11 |
| -functions. |
| 8 | +Build triggers provide a way to interact with the GitLab CI. Using a trigger a |
| 9 | +user or an application can run a new build for a specific commit. |
| 10 | + |
| 11 | +* Object class: :class:`~gitlab.objects.ProjectTrigger` |
| 12 | +* Manager objects: :attr:`gitlab.Gitlab.project_triggers`, |
| 13 | + :attr:`Project.triggers <gitlab.objects.Project.triggers>` |
12 | 14 |
|
13 | 15 | Examples
|
14 | 16 | --------
|
@@ -40,10 +42,11 @@ Remove a trigger:
|
40 | 42 | Build variables
|
41 | 43 | ===============
|
42 | 44 |
|
43 |
| -Use :class:`~gitlab.objects.ProjectVariable` objects to manipulate build |
44 |
| -variables. The :attr:`gitlab.Gitlab.project_variables` and |
45 |
| -:attr:`gitlab.objects.Project.variables` manager objects provide helper |
46 |
| -functions. |
| 45 | +You can associate variables to builds to modify the build script behavior. |
| 46 | + |
| 47 | +* Object class: :class:`~gitlab.objects.ProjectVariable` |
| 48 | +* Manager objects: :attr:`gitlab.Gitlab.project_variables`, |
| 49 | + :attr:`gitlab.objects.Project.variables` |
47 | 50 |
|
48 | 51 | Examples
|
49 | 52 | --------
|
@@ -81,13 +84,25 @@ Remove a variable:
|
81 | 84 | Builds
|
82 | 85 | ======
|
83 | 86 |
|
84 |
| -Use :class:`~gitlab.objects.ProjectBuild` objects to manipulate builds. The |
85 |
| -:attr:`gitlab.Gitlab.project_builds` and :attr:`gitlab.objects.Project.builds` |
86 |
| -manager objects provide helper functions. |
| 87 | +Builds are associated to projects and commits. They provide information on the |
| 88 | +build that have been run, and methods to manipulate those builds. |
| 89 | + |
| 90 | +* Object class: :class:`~gitlab.objects.ProjectBuild` |
| 91 | +* Manager objects: :attr:`gitlab.Gitlab.project_builds`, |
| 92 | + :attr:`gitlab.objects.Project.builds` |
87 | 93 |
|
88 | 94 | Examples
|
89 | 95 | --------
|
90 | 96 |
|
| 97 | +Build are usually automatically triggered, but you can explicitly trigger a |
| 98 | +new build: |
| 99 | + |
| 100 | +Trigger a new build on a project: |
| 101 | + |
| 102 | +.. literalinclude:: builds.py |
| 103 | + :start-after: # trigger run |
| 104 | + :end-before: # end trigger run |
| 105 | + |
91 | 106 | List builds for the project:
|
92 | 107 |
|
93 | 108 | .. literalinclude:: builds.py
|
|
0 commit comments