Compare commits

...

2 commits

Author SHA1 Message Date
bom
e6450b796f Add basic artifact service 2023-08-03 12:15:37 +02:00
bom
c15503b7a0 Update artifact deployment mixin 2023-08-03 12:15:18 +02:00
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,15 @@
from ..infrastructure import GitApi
class ArtifactDeploymentService:
def __init__(self, git_api: GitApi):
self.git_api = git_api
@classmethod
def prod(cls):
return cls(
GitApi(),
)
# def __get_base_artifact_release_url(self, base_url: str, organization: str, name: str) -> str:
# return f"{base_url}/{organization}/{name}/releases"

View file

@ -1,5 +1,6 @@
from pybuilder.core import Project from pybuilder.core import Project
from .devops_build import DevopsBuild from .devops_build import DevopsBuild
from .domain import MixinType
# """ # """
# Functional Req: # Functional Req:
@ -46,7 +47,7 @@ from .devops_build import DevopsBuild
# generate sha256 sums & generate sha512 sums of results of [-1] # generate sha256 sums & generate sha512 sums of results of [-1]
# [6] # [6]
# push results of [-1] & [5] to [0]/[4] # push results of [-1] & [5] to [0]/[4]/assets
# """ # """
@ -54,3 +55,7 @@ from .devops_build import DevopsBuild
class ArtifactDeploymentMixin(DevopsBuild): class ArtifactDeploymentMixin(DevopsBuild):
def __init__(self, project: Project, inp: dict): def __init__(self, project: Project, inp: dict):
super().__init__(project, inp) super().__init__(project, inp)
devops = self.devops_repo.get_devops(self.project)
if MixinType.ARTIFACT_DEPLOYMENT not in devops.mixins: # TODO: Check for Release mixin as well
raise ValueError("ArtifactDeploymentMixin requires MixinType.ARTIFACT_DEPLOYMENT")
self.base_url = 'https://repo.prod.meissa.de/api/v1/repos/'