40 lines
1.0 KiB
Python
40 lines
1.0 KiB
Python
"""Deployment policy for OPAX-MCP."""
|
|
|
|
INITIAL_DEPLOYMENT_TARGET = "opax-mcp"
|
|
|
|
DEPLOYMENT_TARGETS = {
|
|
"opax-mcp": {
|
|
"repository": "chris/OSVauco",
|
|
"region": "us-central1",
|
|
"cloud_run_service": "opax-mcp",
|
|
"build_config": "cloudbuild.deploy.yaml",
|
|
"required_source_paths": (
|
|
"cloudbuild.deploy.yaml",
|
|
"opax-mcp/Dockerfile",
|
|
),
|
|
},
|
|
}
|
|
|
|
|
|
def get_deployment_target(service_key: str) -> dict:
|
|
"""
|
|
Retrieves a copy of the deployment target metadata for a given service key.
|
|
|
|
Args:
|
|
service_key: The identifier for the service.
|
|
|
|
Returns:
|
|
A copy of the deployment target dictionary.
|
|
|
|
Raises:
|
|
ValueError: If the service_key is unknown or invalid.
|
|
"""
|
|
if not isinstance(service_key, str) or not service_key:
|
|
raise ValueError("Invalid service key.")
|
|
|
|
target = DEPLOYMENT_TARGETS.get(service_key)
|
|
if not target:
|
|
raise ValueError(f"Unknown deployment target: {service_key}")
|
|
|
|
return target.copy()
|