From c4ce61b47d0ded28a4ef881f578b310339eaa2ae Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 8 Apr 2018 10:28:21 +0300 Subject: Add: icktool trigger, status, show-log, show-latest-log --- ick2/client.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ick2/client.py') diff --git a/ick2/client.py b/ick2/client.py index ec2a113..533b8cd 100644 --- a/ick2/client.py +++ b/ick2/client.py @@ -214,6 +214,23 @@ class ControllerClient: url = self.url(path) return self._api.post(url, body=obj) + def trigger(self, project_name, pipeline_name): # pragma: no cover + path = '/projects/{}/pipelines/{}/+trigger'.format( + project_name, pipeline_name) + url = self.url(path) + return self._api.get_blob(url) + + def get_build_status( + self, project_name, pipeline_name): # pragma: no cover + path = '/projects/{}/pipelines/{}'.format(project_name, pipeline_name) + url = self.url(path) + return self._api.get_dict(url) + + def get_log(self, build_id): # pragma: no cover + path = '/logs/{}'.format(build_id) + url = self.url(path) + return self._api.get_blob(url) + class AuthClient: -- cgit v1.2.1