forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci_check.py
33 lines (24 loc) · 915 Bytes
/
ci_check.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
from abc import ABC, abstractmethod
from typing import Any
from ci_workflow.ci_target import CiTarget
from git.git_repository import GitRepository
from manifests.input_manifest import Component
class CiCheck(ABC):
def __init__(self, component: Any, target: CiTarget, args: Any = None) -> None:
self.component = component
self.target = target
self.args = args
@abstractmethod
def check(self) -> None:
pass
class CiCheckDist(CiCheck):
pass
class CiCheckSource(CiCheck):
def __init__(self, component: Component, git_repo: GitRepository, target: CiTarget, args: Any = None) -> None:
super().__init__(component, target, args)
self.git_repo = git_repo