summaryrefslogtreecommitdiff
path: root/gitlab/cli.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-06-19 19:29:23 +0200
committerGitHub <noreply@github.com>2016-06-19 19:29:23 +0200
commit80a190888028db4eb1df0c4f827938e89b20f8a1 (patch)
tree198599f8ce7dd6ad35a26b03dab9900199e3a7c5 /gitlab/cli.py
parent412e2bc7e00a5229974388f795caefa1f0896273 (diff)
parentb3e0974451b49ab64866dc131bff59e5471ea620 (diff)
downloadgitlab-80a190888028db4eb1df0c4f827938e89b20f8a1.tar.gz
Merge pull request #125 from gpocentek/issue-122
Add support for build artifacts and trace
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r--gitlab/cli.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py
index 181cc56..bbd2ac4 100644
--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -36,7 +36,9 @@ EXTRA_ACTIONS = {
gitlab.ProjectBranch: {'protect': {'required': ['id', 'project-id']},
'unprotect': {'required': ['id', 'project-id']}},
gitlab.ProjectBuild: {'cancel': {'required': ['id', 'project-id']},
- 'retry': {'required': ['id', 'project-id']}},
+ 'retry': {'required': ['id', 'project-id']},
+ 'artifacts': {'required': ['id', 'project-id']},
+ 'trace': {'required': ['id', 'project-id']}},
gitlab.ProjectCommit: {'diff': {'required': ['id', 'project-id']},
'blob': {'required': ['id', 'project-id',
'filepath']},
@@ -250,6 +252,20 @@ class GitlabCLI(object):
except Exception as e:
_die("Impossible to retry project build (%s)" % str(e))
+ def do_project_build_artifacts(self, cls, gl, what, args):
+ try:
+ o = self.do_get(cls, gl, what, args)
+ return o.artifacts()
+ except Exception as e:
+ _die("Impossible to get project build artifacts (%s)" % str(e))
+
+ def do_project_build_trace(self, cls, gl, what, args):
+ try:
+ o = self.do_get(cls, gl, what, args)
+ return o.trace()
+ except Exception as e:
+ _die("Impossible to get project build trace (%s)" % str(e))
+
def do_project_issue_subscribe(self, cls, gl, what, args):
try:
o = self.do_get(cls, gl, what, args)