Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions control_plane/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -6053,6 +6053,9 @@ def product_action_allowed(
"source_health_status": driver_result.source_health_status,
"destination_health_status": driver_result.destination_health_status,
"backup_status": driver_result.backup_status,
"release_status": driver_result.release_status,
"release_tag": driver_result.release_tag,
"release_url": driver_result.release_url,
"dry_run": driver_result.dry_run,
}
elif path == _GENERIC_WEB_PROD_PROMOTION_WORKFLOW_ROUTE.route_path:
Expand Down
27 changes: 18 additions & 9 deletions control_plane/workflows/generic_web_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
from control_plane import runtime_environments as control_plane_runtime_environments
from control_plane.contracts.deployment_record import DeploymentRecord, ResolvedTargetEvidence
from control_plane.contracts.dokploy_target_record import DokployTargetType
from control_plane.contracts.environment_inventory import EnvironmentInventory
from control_plane.contracts.product_profile_record import (
LaunchplaneProductProfileRecord,
ProductLaneProfile,
)
from control_plane.contracts.promotion_record import HealthcheckEvidence
from control_plane.contracts.ship_request import ShipRequest
from control_plane.workflows.dokploy_deploy import execute_dokploy_artifact_deploy
from control_plane.workflows.inventory import build_environment_inventory
from control_plane.workflows.ship import (
build_deployment_record,
generate_deployment_record_id,
Expand All @@ -29,6 +31,8 @@ def read_product_profile_record(self, product: str) -> LaunchplaneProductProfile

def write_deployment_record(self, record: DeploymentRecord) -> object: ...

def write_environment_inventory(self, record: EnvironmentInventory) -> object: ...


class GenericWebDeployRequest(BaseModel):
model_config = ConfigDict(extra="forbid")
Expand Down Expand Up @@ -305,15 +309,20 @@ def execute_generic_web_deploy(
)

finished_at = utc_now_timestamp()
record_store.write_deployment_record(
build_deployment_record(
request=ship_request,
record_id=record_id,
deployment_id="control-plane-dokploy",
deployment_status="pass",
started_at=started_at,
finished_at=finished_at,
resolved_target=resolved_target,
deployment_record = build_deployment_record(
request=ship_request,
record_id=record_id,
deployment_id="control-plane-dokploy",
deployment_status="pass",
started_at=started_at,
finished_at=finished_at,
resolved_target=resolved_target,
)
record_store.write_deployment_record(deployment_record)
record_store.write_environment_inventory(
build_environment_inventory(
deployment_record=deployment_record,
updated_at=finished_at,
)
)
return GenericWebDeployResult(
Expand Down
Loading
Loading