Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5afa524
feat(ci): CI-01 added generate ci subcommand entrypoint
mitanuriel Mar 14, 2026
bee699b
refactor: rename submodule to ci_generation
mitanuriel Mar 14, 2026
2aba939
feat(ci): CI-02 CiContext struct and context collector
mitanuriel Mar 20, 2026
965a4de
feat(ci): CI-03 runtime version resolver with 8 unit tests
mitanuriel Mar 20, 2026
cc63af2
feat(ci): CI-04 dependency cache strategy module with 10 unit tests
mitanuriel Mar 20, 2026
7dce9ab
Merge remote-tracking branch 'origin/develop' into feature/ci-pipelin…
mitanuriel Mar 30, 2026
90a051f
chore: add .DS_Store to .gitignore
mitanuriel Mar 30, 2026
a2a8e4a
fix(ci): add Serialize derives to CiContext, RuntimeSetup, CacheConfi…
mitanuriel Mar 30, 2026
7f56576
refactor(ci): extract shared make_ctx test helper
mitanuriel Mar 30, 2026
4e0b72d
chore(ci): mark CI handler wiring gap for integration
mitanuriel Mar 30, 2026
1f539fe
feat(ci): CI-14 CiPipeline skeleton schema
mitanuriel Mar 30, 2026
e7a1675
feat(ci): CI-18 trigger configuration module
mitanuriel Mar 30, 2026
7210c2a
feat(ci): CI-15 placeholder token resolution engine
mitanuriel Mar 30, 2026
1d75373
feat(ci): CI-05 test step generator
mitanuriel Mar 30, 2026
469a66d
feat(ci): CI-06 lint step generator
mitanuriel Mar 30, 2026
a319b5d
feat(ci): CI-07 build step generator
mitanuriel Mar 30, 2026
12f92de
fix(ci): CI-18 scheduled placeholder, CI-06 Gradle Checkstyle variant
mitanuriel Mar 30, 2026
7535960
chore: ignore all .DS_Store files
mitanuriel Mar 30, 2026
d5034f3
feat(ci): CI-08 Docker build and tag step generator
mitanuriel Mar 30, 2026
883855c
feat(ci): CI-09 container image security scan step generator
mitanuriel Mar 30, 2026
2377872
feat(ci): CI-10 secret and credential leak scan step generator
mitanuriel Mar 30, 2026
a9612d9
fix(ci): expand schema fields for CI-08/09/10 spec gaps (buildx, SARI…
mitanuriel Mar 30, 2026
f150891
feat(ci): CI-11 GitHub Actions CI template builder
mitanuriel Mar 30, 2026
67bbd6f
feat(ci): CI-12 Azure Pipelines CI template builder
mitanuriel Mar 30, 2026
4a58bfc
feat(ci): CI-13 GCP Cloud Build CI template builder
mitanuriel Mar 30, 2026
0b69bb7
feat(ci): CI-22 .syncable.ci.toml config struct and merge
mitanuriel Mar 30, 2026
40aed8f
feat(ci): CI-19 secrets inventory generator
mitanuriel Mar 30, 2026
76b777a
feat(ci): CI-16 monorepo CI strategy generator
mitanuriel Mar 30, 2026
0b9fa69
feat(ci): CI-17 multi-version test matrix generator
mitanuriel Mar 30, 2026
08263d6
feat(ci): CI-20 CI file writer & conflict detection
mitanuriel Mar 30, 2026
fe18804
feat(ci): CI-20 close gaps — interactive prompt, merge, summary table
mitanuriel Mar 30, 2026
2609c2e
feat(ci): CI-21/23/24 dry-run renderer, coverage upload step, Slack n…
mitanuriel Mar 30, 2026
c844a44
fix(ci): CI-24 wire --notify flag and config key through handler (gap…
mitanuriel Mar 30, 2026
a07dd4c
test(ci): CI-25/26 unit and integration tests, language fixtures, ins…
mitanuriel Mar 31, 2026
4cd0756
feat(ci): CI-01/27/28 — wire full pipeline, telemetry, update docs
mitanuriel Mar 31, 2026
81de4b8
fix(ci): root-manifest language priority, platform SHA exprs, Azure/G…
mitanuriel Mar 31, 2026
7f35cf4
feat(ci): DEV-43 — secrets_doc scalar walker, platform-aware where_to…
mitanuriel Apr 8, 2026
71fdbda
feat(cd): CD generation foundation (CD-02, CD-17, CD-22)
mitanuriel Apr 14, 2026
fb0697f
feat(cd): Session 2 — Auth & Registry modules (CD-03, CD-04, CD-05, C…
mitanuriel Apr 14, 2026
c3b1ff1
feat(cd): Session 3 — Deploy steps, migration & health check (CD-07..…
mitanuriel Apr 14, 2026
e2c51ab
feat(cd): Templates, Writer, Pipeline Builder & CLI Entrypoint
mitanuriel Apr 14, 2026
2694691
feat(cd): Advanced features (CD-12..CD-16, CD-21, CD-29)
mitanuriel Apr 14, 2026
54706a2
feat(cd): combined CI+CD command, config, secrets doc & tests (CD-23/…
mitanuriel Apr 14, 2026
048fad1
docs(cd): add generate cd and generate ci-cd sections to command-over…
mitanuriel Apr 15, 2026
cd5e652
fix(CD-24): apply migration_command from .syncable.cd.toml to pipeline
mitanuriel Apr 15, 2026
89dd103
fix(cd): correct YAML step indentation in Azure/GCP/Hetzner templates
mitanuriel Apr 21, 2026
7a057f3
Merge remote-tracking branch 'origin/main' into feature/ci-pipeline-g…
mitanuriel Apr 24, 2026
5905719
Merge pull request #330 from syncable-dev/feature/ci-pipeline-generation
Alex793x May 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(cd): add generate cd and generate ci-cd sections to command-over…
…view (CD-30)

- Added 2c. sync-ctl generate cd: full options table, platform/target
  matrix, registry defaults, CD steps, multi-env structure, config file
  (.syncable.cd.toml) docs, output files, and examples
- Added 2d. sync-ctl generate ci-cd: options table, all 4 output files,
  examples for all 3 platforms
- Updated table of contents with links to both new sections
- Completes CD-30 (Documentation & Help Text for CD Generation)
  • Loading branch information
mitanuriel committed Apr 15, 2026
commit 048fad133051faf8289f3419e4b7fe9723915d40
159 changes: 158 additions & 1 deletion docs/command-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ This document provides a comprehensive reference for all Syncable CLI commands,
- [Global Options](#-global-options)
- [Commands](#-commands)
- [analyze](#1-sync-ctl-analyze) - Project analysis
- [generate](#2-sync-ctl-generate) - IaC generation
- [generate iac](#2-sync-ctl-generate) - IaC generation (Dockerfile, Compose, Terraform)
- [generate ci](#2b-sync-ctl-generate-ci-project_path) - CI pipeline generation
- [generate cd](#2c-sync-ctl-generate-cd-project_path) - CD pipeline generation
- [generate ci-cd](#2d-sync-ctl-generate-ci-cd-project_path) - Combined CI+CD generation
- [validate](#3-sync-ctl-validate) - IaC validation (planned)
- [support](#4-sync-ctl-support) - Show supported tech
- [dependencies](#5-sync-ctl-dependencies) - Dependency analysis
Expand Down Expand Up @@ -243,6 +246,160 @@ sync-ctl generate ci . --platform azure --env-prefix MY_APP

---

### 2c. `sync-ctl generate cd <PROJECT_PATH>`

Generate a CD (Continuous Deployment) pipeline skeleton for GitHub Actions from automatic project analysis. Detects Dockerfile presence, Terraform and Helm charts, migration tooling, and existing Kubernetes manifests — then produces a deployment workflow with environment gates, health checks, rollback comments, and a `SECRETS_REQUIRED.md` listing every credential needed.

**Arguments:**
- `<PROJECT_PATH>` — Path to the project directory to analyse (default: `.`)

**Options:**

| Flag | Short | Description |
|------|-------|-------------|
| `--platform <azure\|gcp\|hetzner>` | | Target cloud platform (required) |
| `--target <TARGET>` | | Specific deploy target within the platform (see table below) |
| `--registry <acr\|gar\|ghcr>` | | Container registry override (defaults per platform) |
| `--image-name <NAME>` | | Docker image name (defaults to project directory name) |
| `--dry-run` | | Print generated YAML to stdout; do not write any files |
| `--output <DIR>` | `-o` | Write files to this directory instead of the project root |
| `--force` | | Overwrite existing pipeline files |

**Platform targets:**

| Platform | Target | Deploy mechanism |
|----------|--------|-----------------|
| `azure` | `app-service` (default) | `az webapp deploy` |
| `azure` | `aks` | `azure/k8s-deploy@v5` + `kubectl` |
| `azure` | `container-apps` | `az containerapp update` |
| `gcp` | `cloud-run` (default) | `gcloud run deploy` |
| `gcp` | `gke` | `gcloud container clusters get-credentials` + `kubectl` |
| `hetzner` | `vps` (default) | SSH + `docker compose pull && up -d` |
| `hetzner` | `hetzner-k8s` | kubeconfig + `kubectl apply` |
| `hetzner` | `coolify` | Coolify webhook deploy |

**Registry defaults per platform:**

| Platform | Default registry |
|----------|-----------------|
| `azure` | ACR (Azure Container Registry) |
| `gcp` | GAR (Google Artifact Registry) |
| `hetzner` | GHCR (GitHub Container Registry) |

**CD steps generated (canonical order):**

| Step | Condition |
|------|-----------|
| Trigger (push to default branch + `workflow_dispatch`) | Always |
| Checkout | Always |
| Platform authentication (OIDC/SSH) | Always |
| Container registry login | Always |
| Docker build + push | Only when `has_dockerfile = true` |
| Terraform init/plan/apply | Only when Terraform directory is detected |
| Database migration | Only when migration tool is detected (Prisma, Flyway, Alembic, etc.) |
| Deploy (platform-specific) | Always |
| Health check (post-deploy) | Always |
| Slack notification | Wired up; requires `SLACK_WEBHOOK_URL` secret |
| Rollback strategy comment | Always (documents `kubectl rollout undo` / `az webapp deployment slot swap` etc.) |

**Multi-environment structure:** Every generated pipeline includes a `staging` and `production` job. Production requires a GitHub environment approval gate (`environment: production`).

**Output files:**

```
.github/workflows/deploy-<platform>.yml CD workflow
.syncable/cd-manifest.toml Machine-readable context + unresolved tokens
.syncable/SECRETS_REQUIRED.md Per-platform secret setup instructions
```

**Project-level config (`.syncable.cd.toml`):**

Override any detected value without CLI flags by placing a config file at the project root:

```toml
platform = "azure"
target = "aks"
registry = "acr"
image_name = "my-api"
health_check_path = "/api/health"
default_branch = "main"
environments = ["staging", "production"]
```

Priority order: auto-detected value → config file → CLI flag.

**Examples:**

```bash
# Preview CD pipeline for Azure App Service
sync-ctl generate cd . --platform azure --dry-run

# Write GCP Cloud Run pipeline
sync-ctl generate cd . --platform gcp --target cloud-run

# Hetzner VPS deploy with custom image name
sync-ctl generate cd . --platform hetzner --target vps --image-name my-api

# AKS deploy, write to a specific directory
sync-ctl generate cd . --platform azure --target aks -o ./pipelines --force
```

**Status:** ✅ Implemented (EPIC 2 complete)

---

### 2d. `sync-ctl generate ci-cd <PROJECT_PATH>`

Generate both CI and CD pipelines in one shot. Runs both generators from a single project analysis, cross-links the `IMAGE_TAG` environment variable between CI and CD outputs, and produces a single merged `SECRETS_REQUIRED.md` covering all secrets for both pipelines.

**Arguments:**
- `<PROJECT_PATH>` — Path to the project directory to analyse (default: `.`)

**Options:**

| Flag | Short | Description |
|------|-------|-------------|
| `--platform <azure\|gcp\|hetzner>` | | Target cloud platform (required) |
| `--ci-format <github-actions\|azure-pipelines\|cloud-build>` | | Override CI format (defaults to platform convention) |
| `--target <TARGET>` | | CD deploy target (same options as `generate cd`) |
| `--registry <acr\|gar\|ghcr>` | | Container registry override |
| `--image-name <NAME>` | | Docker image name |
| `--dry-run` | | Print both pipelines to stdout; do not write files |
| `--output <DIR>` | `-o` | Write all files to this directory |
| `--force` | | Overwrite existing files |
| `--notify` | | Append a Slack failure-notification step in the CI pipeline |

**Output files:**

```
.github/workflows/ci.yml CI workflow (GitHub Actions)
.github/workflows/deploy-<platform>.yml CD workflow
azure-pipelines.yml CI workflow (Azure Pipelines, if platform=azure)
cloudbuild.yaml CI workflow (Cloud Build, if platform=gcp)
.syncable/cd-manifest.toml CD context + unresolved tokens
.syncable/SECRETS_REQUIRED.md Merged CI + CD secrets documentation
```

**Examples:**

```bash
# Preview both pipelines for Azure AKS
sync-ctl generate ci-cd . --platform azure --target aks --dry-run

# Write GCP Cloud Run CI+CD, with Slack notifications on CI failure
sync-ctl generate ci-cd . --platform gcp --target cloud-run --notify

# Hetzner VPS, write to a temp directory
sync-ctl generate ci-cd . --platform hetzner --target vps -o /tmp/pipelines --force

# Azure, override CI format to GitHub Actions instead of Azure Pipelines
sync-ctl generate ci-cd . --platform azure --ci-format github-actions --dry-run
```

**Status:** ✅ Implemented (CD-23)

---

### 3. `sync-ctl validate <PATH>`

Validate existing IaC files against best practices.
Expand Down