|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import deprecation
|
|
|
|
|
from enum import Enum
|
|
|
|
|
from typing import List
|
|
|
|
|
from .common import Devops, BuildType, MixinType
|
|
|
|
|
from typing import List, Optional, Dict
|
|
|
|
|
from .common import Validateable, Devops, BuildType, MixinType
|
|
|
|
|
from .image import Image
|
|
|
|
|
from .c4k import C4k
|
|
|
|
|
from .release import Release
|
|
|
|
@ -12,17 +12,17 @@ class DevopsFactory:
|
|
|
|
|
def __init__(self):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
def build_devops(self, input: dict, version: Version = None) -> Devops:
|
|
|
|
|
def build_devops(self, input: dict, version: Optional[Version] = None) -> Devops:
|
|
|
|
|
build_types = self.__parse_build_types__(input["build_types"])
|
|
|
|
|
mixin_types = self.__parse_mixin_types__(input["mixin_types"])
|
|
|
|
|
|
|
|
|
|
specialized_builds = {}
|
|
|
|
|
specialized_builds: Dict[BuildType, Validateable] = {}
|
|
|
|
|
if BuildType.IMAGE in build_types:
|
|
|
|
|
specialized_builds[BuildType.IMAGE] = Image(input)
|
|
|
|
|
if BuildType.C4K in build_types:
|
|
|
|
|
specialized_builds[BuildType.C4K] = C4k(input)
|
|
|
|
|
|
|
|
|
|
mixins = {}
|
|
|
|
|
mixins: Dict[MixinType, Validateable] = {}
|
|
|
|
|
if MixinType.RELEASE in mixin_types:
|
|
|
|
|
mixins[MixinType.RELEASE] = Release(input, version)
|
|
|
|
|
|
|
|
|
|