summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2019-10-24 08:50:39 +0200
committerMax Wittig <max.wittig@siemens.com>2019-10-24 09:17:07 +0200
commitca256a07a2cdaf77a5c20e307d334b82fd0fe861 (patch)
treed17e58ebcd62a2e92905b79f358cc94ad4f5b968 /gitlab/v4/objects.py
parente790b1ec40ed690152776a87c15e7f7d5d3b9136 (diff)
downloadgitlab-feat/deployment-create.tar.gz
feat: add deployment creationfeat/deployment-create
Added in GitLab 12.4 Fixes #917
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 44188c7..474cc2b 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -3735,15 +3735,16 @@ class ProjectApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTManager):
self.gitlab.http_put(path, post_data=data, **kwargs)
-class ProjectDeployment(RESTObject):
+class ProjectDeployment(RESTObject, SaveMixin):
pass
-class ProjectDeploymentManager(RetrieveMixin, RESTManager):
+class ProjectDeploymentManager(RetrieveMixin, CreateMixin, UpdateMixin, RESTManager):
_path = "/projects/%(project_id)s/deployments"
_obj_cls = ProjectDeployment
_from_parent_attrs = {"project_id": "id"}
_list_filters = ("order_by", "sort")
+ _create_attrs = (("sha", "ref", "tag", "status", "environment"), tuple())
class ProjectProtectedBranch(ObjectDeleteMixin, RESTObject):