Skip to content

Commit 54706a2

Browse files
committed
feat(cd): combined CI+CD command, config, secrets doc & tests (CD-23/24/25/26/27/28)
CD-23: Combined CI+CD command (generate ci-cd) - Added CiCd variant to GenerateCommand with platform, ci_format, target, registry, image_name, dry_run, output, force, notify flags - handle_generate_cicd orchestrates both generators, cross-links secrets doc - Wired in cli.rs, lib.rs, main.rs with telemetry tracking CD-24: .syncable.cd.toml project-level config - CdConfig struct with all-optional fields (platform, target, environments, registry, image_name, health_check_path, migration_command, default_branch) - load_cd_config: dedicated .syncable.cd.toml takes precedence over shared .syncable.toml [cd] table - merge_config_into_cd_context: config file layer between detection and CLI - 19 unit tests CD-27: CD secrets inventory documentation - collect_cd_secret_names: scans rendered YAML for secrets.* references - secret_metadata: known descriptions for Azure/GCP/Hetzner/Slack secrets - render_cd_secrets_table: markdown table output - generate_cd_secrets_doc: full document generator CD-28: Hetzner prerequisites checklist - Firewall rules (22/80/443/6443), SSH key, Docker, DNS checklist - Auto-appended to secrets doc when platform is Hetzner CD-25: Comprehensive unit tests (33 tests) - cd_snapshot_tests: 24 tests covering Azure/GCP/Hetzner pipeline rendering, environment structure, health check, migration, terraform, notification, rollback, token resolution, multi-platform consistency, no hardcoded secrets - cd_cross_linking_tests: 9 tests covering dispatch/environment consistency, versioning+notification composability, terraform+rollback, reusable workflow CD-26: Integration tests (31 tests) - Full pipeline rendering for all 8 platform/target combinations - No hardcoded secrets validation - Secrets doc generation for Azure/GCP/Hetzner - Context collection from 5 language fixtures (node/python/rust/go/java) - Config loading + merging integration - Cross-platform consistency, health check presence, secrets expression syntax Total: 2,164 tests passing (0 failures)
1 parent 2694691 commit 54706a2

10 files changed

Lines changed: 1958 additions & 2 deletions

File tree

‎src/cli.rs‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,49 @@ pub enum GenerateCommand {
854854
#[arg(long)]
855855
force: bool,
856856
},
857+
858+
/// Generate both CI and CD pipelines in one shot
859+
CiCd {
860+
/// Path to the project directory
861+
#[arg(value_name = "PROJECT_PATH", default_value = ".")]
862+
path: PathBuf,
863+
864+
/// Cloud platform target
865+
#[arg(long, value_enum)]
866+
platform: CdPlatform,
867+
868+
/// CI pipeline file format (defaults to GitHub Actions)
869+
#[arg(long, value_enum)]
870+
ci_format: Option<CiFormat>,
871+
872+
/// Specific deploy target within the platform
873+
#[arg(long, value_enum)]
874+
target: Option<CdTarget>,
875+
876+
/// Container registry to use (defaults per platform)
877+
#[arg(long, value_enum)]
878+
registry: Option<CdRegistry>,
879+
880+
/// Docker image name (defaults to project name)
881+
#[arg(long, value_name = "IMAGE_NAME")]
882+
image_name: Option<String>,
883+
884+
/// Print the generated pipelines to stdout instead of writing files
885+
#[arg(long)]
886+
dry_run: bool,
887+
888+
/// Output directory for generated pipeline files
889+
#[arg(short, long, value_name = "OUTPUT_DIR")]
890+
output: Option<PathBuf>,
891+
892+
/// Overwrite existing files
893+
#[arg(long)]
894+
force: bool,
895+
896+
/// Emit a Slack failure-notification step in the CI pipeline
897+
#[arg(long)]
898+
notify: bool,
899+
},
857900
}
858901

859902
/// Cloud platform target for CI pipeline generation

0 commit comments

Comments
 (0)