Skip to main content

systemprompt_sync/deploy/
request.rs

1//! Typed inputs and outputs for [`super::DeployOrchestrator`].
2
3use std::path::PathBuf;
4
5use systemprompt_cloud::CloudCredentials;
6use systemprompt_identifiers::TenantId;
7
8#[derive(Debug)]
9pub struct DeployRequest {
10    pub tenant_id: TenantId,
11    pub tenant_name: String,
12    pub profile_name: String,
13    pub project_root: PathBuf,
14    pub credentials: CloudCredentials,
15    pub hostname: Option<String>,
16    pub secrets_path: PathBuf,
17    pub signing_key_path: PathBuf,
18    pub options: DeployOptions,
19}
20
21#[derive(Debug, Clone, Copy)]
22pub struct DeployOptions {
23    pub skip_push: bool,
24    pub dry_run: bool,
25    /// `None` runs the pipeline without any pre-sync phase (and without the
26    /// skip warnings) — used for the initial deploy of a freshly provisioned
27    /// tenant, where no runtime files exist yet to lose.
28    pub pre_sync: Option<PreSyncOptions>,
29}
30
31#[derive(Debug, Clone, Copy)]
32pub struct PreSyncOptions {
33    pub no_sync: bool,
34    pub assume_yes: bool,
35}
36
37#[derive(Debug)]
38pub struct DeployReport {
39    pub outcome: DeployOutcome,
40}
41
42#[derive(Debug)]
43pub enum DeployOutcome {
44    DryRun,
45    Deployed {
46        image: String,
47        status: String,
48        app_url: Option<String>,
49    },
50}