Skip to main content

alien_core/deployment/
release.rs

1//! Release metadata for deployment version tracking.
2
3use crate::Stack;
4use serde::{Deserialize, Serialize};
5
6/// A signed statement as it is stored and forwarded: the exact bytes that were
7/// signed and the signatures over them. Carriers pass it through unchanged;
8/// only enforcers verify it (see `alien-signing`).
9pub use alien_signing::SignedStatement;
10
11/// Release metadata
12///
13/// Identifies a specific release version and includes the stack definition.
14/// The deployment engine uses this to track which release is currently deployed
15/// and which is the target.
16#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
17#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
18#[serde(rename_all = "camelCase")]
19pub struct ReleaseInfo {
20    /// Release ID (e.g., rel_xyz). `None` for an observe deployment, which has no
21    /// Alien-assigned release — the platform resolves a release from `version`.
22    #[serde(default, skip_serializing_if = "Option::is_none")]
23    pub release_id: Option<String>,
24    /// Version string (e.g., 2.1.0)
25    #[serde(skip_serializing_if = "Option::is_none")]
26    pub version: Option<String>,
27    /// Short description of the release
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub description: Option<String>,
30    /// Stack definition for this release
31    pub stack: Stack,
32    /// The developer's signed `release/v2` statement for this platform, when
33    /// the release was signed. A protected deployment deploys only the stack
34    /// inside it and ignores `stack`.
35    #[serde(default, skip_serializing_if = "Option::is_none")]
36    pub signed: Option<SignedStatement>,
37    /// The project's signer list chain, oldest first, carried with a signed
38    /// release so the deployment can verify it.
39    #[serde(default, skip_serializing_if = "Vec::is_empty")]
40    pub signer_lists: Vec<SignedStatement>,
41}