summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects
diff options
context:
space:
mode:
authorRaphaƫl Monat <raphael.monat@lip6.fr>2020-12-10 18:33:24 +0100
committerNejc Habjan <hab.nejc@gmail.com>2021-05-29 22:40:51 +0200
commitee9f96e61ab5da0ecf469c21cccaafc89130a896 (patch)
tree1521454c3fa9da89eba68547b5fb9aebb044595e /gitlab/v4/objects
parent861d3d28ebca719d06bb004556daa12c24ffec72 (diff)
downloadgitlab-ee9f96e61ab5da0ecf469c21cccaafc89130a896.tar.gz
feat(objects): add pipeline test report support
Diffstat (limited to 'gitlab/v4/objects')
-rw-r--r--gitlab/v4/objects/pipelines.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/gitlab/v4/objects/pipelines.py b/gitlab/v4/objects/pipelines.py
index 644df7d..01f29b8 100644
--- a/gitlab/v4/objects/pipelines.py
+++ b/gitlab/v4/objects/pipelines.py
@@ -5,6 +5,7 @@ from gitlab.mixins import (
CreateMixin,
CRUDMixin,
DeleteMixin,
+ GetWithoutIdMixin,
ListMixin,
ObjectDeleteMixin,
RefreshMixin,
@@ -26,6 +27,8 @@ __all__ = [
"ProjectPipelineScheduleVariableManager",
"ProjectPipelineSchedule",
"ProjectPipelineScheduleManager",
+ "ProjectPipelineTestReport",
+ "ProjectPipelineTestReportManager",
]
@@ -34,6 +37,7 @@ class ProjectPipeline(RefreshMixin, ObjectDeleteMixin, RESTObject):
("jobs", "ProjectPipelineJobManager"),
("bridges", "ProjectPipelineBridgeManager"),
("variables", "ProjectPipelineVariableManager"),
+ ("test_report", "ProjectPipelineTestReportManager"),
)
@cli.register_custom_action("ProjectPipeline")
@@ -201,3 +205,13 @@ class ProjectPipelineScheduleManager(CRUDMixin, RESTManager):
_update_attrs = RequiredOptional(
optional=("description", "ref", "cron", "cron_timezone", "active"),
)
+
+
+class ProjectPipelineTestReport(RESTObject):
+ _id_attr = None
+
+
+class ProjectPipelineTestReportManager(GetWithoutIdMixin, RESTManager):
+ _path = "/projects/%(project_id)s/pipelines/%(pipeline_id)s/test_report"
+ _obj_cls = ProjectPipelineTestReport
+ _from_parent_attrs = {"project_id": "project_id", "pipeline_id": "id"}