summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 2609e1b..e61483a 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -961,6 +961,12 @@ class ProjectBuild(GitlabObject):
r = self.gitlab._raw_post(url)
raise_error_from_response(r, GitlabBuildRetryError, 201)
+ def play(self, **kwargs):
+ """Trigger a build explicitly."""
+ url = '/projects/%s/builds/%s/play' % (self.project_id, self.id)
+ r = self.gitlab._raw_post(url)
+ raise_error_from_response(r, GitlabBuildPlayError, 201)
+
def erase(self, **kwargs):
"""Erase the build (remove build artifacts and trace)."""
url = '/projects/%s/builds/%s/erase' % (self.project_id, self.id)