stabilizaiton work - projects rework for maintenanceability and ui livening
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// S3UnifiedArtifactStoreOptions.cs
|
||||
// Sprint: SPRINT_20260118_017_Evidence_artifact_store_unification
|
||||
// Task: AS-002 - Implement S3-backed ArtifactStore
|
||||
// Description: Configuration options for S3-backed artifact store
|
||||
// -----------------------------------------------------------------------------
|
||||
namespace StellaOps.Artifact.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration options for S3-backed artifact store.
|
||||
/// </summary>
|
||||
public sealed class S3UnifiedArtifactStoreOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// S3 bucket name.
|
||||
/// </summary>
|
||||
public string BucketName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Path prefix within the bucket.
|
||||
/// </summary>
|
||||
public string Prefix { get; set; } = "artifacts";
|
||||
|
||||
/// <summary>
|
||||
/// Whether to use content-addressable storage for deduplication.
|
||||
/// </summary>
|
||||
public bool EnableDeduplication { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to store metadata as sidecar JSON files.
|
||||
/// </summary>
|
||||
public bool UseSidecarMetadata { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to overwrite existing artifacts.
|
||||
/// </summary>
|
||||
public bool AllowOverwrite { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum artifact size in bytes.
|
||||
/// </summary>
|
||||
public long MaxArtifactSizeBytes { get; set; } = 100 * 1024 * 1024; // 100MB
|
||||
|
||||
/// <summary>
|
||||
/// Retention policies per artifact type. Key is ArtifactType enum name.
|
||||
/// Sprint: SPRINT_20260118_017 (AS-002)
|
||||
/// </summary>
|
||||
public Dictionary<string, RetentionPolicy> RetentionPolicies { get; set; } = new()
|
||||
{
|
||||
["Sbom"] = new RetentionPolicy { RetentionDays = 365 * 7, DeleteAfterExpiry = false },
|
||||
["Vex"] = new RetentionPolicy { RetentionDays = 365 * 7, DeleteAfterExpiry = false },
|
||||
["Dsse"] = new RetentionPolicy { RetentionDays = 365 * 7, DeleteAfterExpiry = false },
|
||||
["RekorProof"] = new RetentionPolicy { RetentionDays = 365 * 10, DeleteAfterExpiry = false },
|
||||
["Attestation"] = new RetentionPolicy { RetentionDays = 365 * 7, DeleteAfterExpiry = false },
|
||||
["BuildLog"] = new RetentionPolicy { RetentionDays = 365, DeleteAfterExpiry = true },
|
||||
["ScanResult"] = new RetentionPolicy { RetentionDays = 365 * 2, DeleteAfterExpiry = true },
|
||||
["Temporary"] = new RetentionPolicy { RetentionDays = 30, DeleteAfterExpiry = true }
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Default retention policy for unspecified artifact types.
|
||||
/// </summary>
|
||||
public RetentionPolicy DefaultRetentionPolicy { get; set; } = new()
|
||||
{
|
||||
RetentionDays = 365 * 5,
|
||||
DeleteAfterExpiry = false
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user