From 673dc3636e5ab6846c88cb4dac71f0690b02494d Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Mon, 3 Oct 2016 06:39:44 +0200 Subject: Implement ProjectBuild.play() --- gitlab/objects.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gitlab/objects.py') 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) -- cgit v1.2.1