17 lines
582 B
Python
17 lines
582 B
Python
from typing import Literal, Optional
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class DevOpsReconcileJobHeartbeatPayload(BaseModel):
|
|
operation: Literal["heartbeat"] = "heartbeat"
|
|
id: str
|
|
status: Literal["running", "success", "failed", "terminated"]
|
|
phase: Literal["initializing", "jenkins_build", "building", "deploying", "finished"]
|
|
phase_message: str
|
|
error: Optional[str] = None
|
|
url: Optional[str] = None
|
|
|
|
|
|
class DevOpsReconcileJobHeartbeatMessage(BaseModel):
|
|
event_type: Literal["DevOpsReconcileJobHeartbeat"]
|
|
payload: DevOpsReconcileJobHeartbeatPayload |