Merge branch 'feature/dax/devops-svc' of https://gitea.freeleaps.mathmast.com/freeleaps/freeleaps-service-hub into feature/dax/devops-svc
This commit is contained in:
commit
dd642994d4
@ -4,7 +4,6 @@ from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
|
||||
from beanie import Document
|
||||
from bson import ObjectId
|
||||
from pydantic import Field, field_validator
|
||||
from pydantic import BaseModel
|
||||
from pymongo import IndexModel
|
||||
@ -26,6 +25,7 @@ class Deployment(Document):
|
||||
deployment_git_url: str
|
||||
deployment_git_sha256: str
|
||||
deployment_reason: str
|
||||
deployment_app_url: str = "" # URL to access the deployed application, keep it empty to be filled later
|
||||
|
||||
deployed_by: str
|
||||
created_at: datetime = datetime.now()
|
||||
@ -41,8 +41,8 @@ class Deployment(Document):
|
||||
|
||||
class InitDeploymentRequest(BaseModel):
|
||||
product_id: str
|
||||
sha256: str
|
||||
target_env: str
|
||||
sha256: str = ""
|
||||
target_env: Literal["alpha", "prod"]
|
||||
user_id: str
|
||||
reason: str = "not provided"
|
||||
ttl_hours: int = 3
|
||||
@ -54,7 +54,7 @@ class CheckDeploymentStatusRequest(BaseModel):
|
||||
|
||||
class CheckApplicationLogsRequest(BaseModel):
|
||||
product_id: str
|
||||
target_env: Literal["alpha", "prod"] = "alpha"
|
||||
target_env: Literal["alpha", "prod"]
|
||||
user_id: str = ''
|
||||
log_level: List[Literal["info", "error", "debug"]] = Field(default_factory=lambda: ["info"])
|
||||
start_time: datetime = datetime.now() - timedelta(minutes=5)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user