v1.31.0
guíaPatrón · 08_CICDenglishversión en español

CI/CD adoption guide — phases 0, 1 and 2

8 minlectura
1837palabras
9secciones
2026-09-22última edición
1cambios

Audience: developers and project managers. Purpose: pick the right level of CI/CD for your project before running /hv:cicd-init. Origin: Ovillo's double-barrier model, local + remote pipeline.


Is your repository on GitHub? The phases are the same; what you need and what gets generated change. Read GUIA_GITHUB_ACTIONS.md (§ 2 and § 3) and use this guide for the phase model.

TL;DR — which one to choose

PhaseState of the projectInitial effortWhat you gainWhat you do NOT get
Phase 0No Azure DevOps infrastructure at all, manual deployment0 hours (just Ovillo locally)/hv:verify 7 phases before pushing, discipline remindersRemote build, green/red CI, automatic deployment
Phase 1You have access to Azure DevOps + a build agent online~2 hoursBuild validation branch policy, dotnet build + dotnet test on every PRAutomatic deployment, rollback, manual gates
Phase 2You have the configured pool + <ENV>_DEPLOY agents + an approvers group~6 hoursFull pipeline Build → DEV (auto) → DEMO (manual gate) → PROD (environment gate, 2 servers rolling, triple rollback)— (this is the ceiling)

Quick rule: start at the lowest phase you can sustain. Moving up is easy; moving down hurts.


Phase 0 — Ovillo locally only

When it applies

  • A new project, or one with no previous pipeline.
  • The organization's infrastructure team has not authorized the configured pool for the project yet.
  • A small team (one developer) with no need for remote validation.
  • Occasional deployments (every few weeks), not daily.

What /hv:cicd-init generates in phase 0

  1. RUNBOOK_DEPLOY_MANUAL.md adapted to the project: RDP into the server, copy the DLLs, recycle the app pool, manual smoke test.
  2. Pre-push reminders in the project's CLAUDE.md ("Pre-commit" section): they require running /hv:verify before each git push.
  3. An entry in _hilo/ESTADO_PROYECTO.json.infraestructura.cicd[] with { fase: 0, ... }.

What it does NOT generate

  • ❌ azure-pipelines.yml (there is no pipeline)
  • ❌ A call to the Hub MCP (register_pipeline is skipped)
  • ❌ Azure DevOps agents or groups

How to move up to phase 1

Once the infrastructure team authorizes the configured pool for the project and a build agent (cicd.buildAgent) is available:

claude /hv:cicd-init  # detects phase 0 and rewrites to phase 1 (idempotent edit mode, PHASE 0.5)

Phase 1 — Build validation branch policy

When it applies

  • You have access to Azure DevOps and the configured pool is authorized.
  • The build agent (cicd.buildAgent) is online (the infrastructure team confirms it).
  • You want to block merges with a red build or red tests, while deployment stays manual.
  • A team of two or more developers (PRs need protection).

What /hv:cicd-init generates in phase 1

  1. A minimal azure-pipelines.yml: a single Build stage with dotnet restore/build/test and dotnet publish → the drop artifact. No CD, no deployment groups.
  2. Registering the pipeline in Azure DevOps through _apis/build/definitions (PHASE 2.5 of the command).
  3. A suggested build validation branch policy (by hand in the Azure DevOps UI, or through _apis/policy/configurations).
  4. Registration in the Hub MCP: the register_pipeline tool with fase=1.
  5. An entry in _hilo/ESTADO_PROYECTO.json.infraestructura.cicd[] with { fase: 1, pipelineId, url, stages: ['Build'] }.

What it does NOT generate

  • ❌ DeployDev/Demo/Prod stages
  • ❌ Variable groups for secrets
  • ❌ Automatic backup and rollback
  • ❌ A runbook (deployment is manual from the artifact)

How to move up to phase 2

Once the infrastructure team installs <SERVER>_DEPLOY agents with the capability DeployTarget=<env>-<app|svc> (R1/R25: one agent per environment × type — applications and services; see PERMISOS_CICD.md §3) on every target server:

claude /hv:cicd-init  # detects phase 1 and rewrites to phase 2, adding the CD stages (edit mode, PHASE 0.5)

Phase 2 — Full CD pipeline

When it applies

  • You have had phase 1 running stably for four weeks or more.
  • The infrastructure team confirms agents online in DEV, DEMO and PROD (each server with its own <SERVER>_DEPLOY agent).
  • The Azure DevOps approvers group is created and populated (two or more members for PROD).
  • A supported stack: .NET ASP.NET Core (in-process) or Vue 3 + Vite + TS (a static SPA).

What /hv:cicd-init generates in phase 2

  1. A full azure-pipelines.yml: stages Build → DeployDev (auto) → DeployDemo (ManualValidation@0 gate) → DeployProd (environment + group approval + two servers rolling).
  2. Triple PROD rollback: a pre-deploy backup + MSDeploy enableRule:DoNotDeleteRule + a condition: failed() restore step.
  3. A variable group <PIPELINE_NAME>-secrets created through _apis/distributedtask/variablegroups, with a pre-build fail-fast (it checks that the secrets actually have values).
  4. Retention rules: main branch 30 days/5 builds, others 7 days/1 build.
  5. A coverage gate: it warns (WARN-first) or blocks if line/branch coverage drops below the threshold (coverage-gate.ps1, our own script; -Mode block to block; it does not compute CRAP).
  6. The project's RUNBOOK.md: six sections (build fails / DEMO deployment fails / PROD deployment fails / app down after a green deployment / contacts / backups), one page each at most.
  7. Registration in the Hub MCP: the register_pipeline tool with fase=2.

Limits to respect

Before editing the YAML by hand, check your platform's constraints (cicd.platform + cicd.variant). On the server-2020 variant these apply:

  • ❌ NEVER Cache@2 (the Pipeline Caching service does not exist in Azure DevOps Server 2020)
  • ❌ NEVER IISWebAppDeployment@1 (a deprecated preview) → use IISWebAppDeploymentOnMachineGroup@0
  • ❌ NEVER the deploymentGroup: keyword (the schema rejects it)
  • ❌ NEVER DownloadBuildArtifacts@0 / DownloadPipelineArtifact@2 (a Node.js SSL bug against the on-premise host) → use the REST API + PowerShell
  • ❌ NEVER TLS 1.0/1.1 in PowerShell scripts (PS 5.1 defaults to 1.0; force 1.2+)

Summary table — what you need for each phase

RequirementPhase 0Phase 1Phase 2
_hilo/ESTADO_PROYECTO.json configured✅✅✅
/hv:verify run before pushing✅ recommended✅ mandatory✅ mandatory
Azure DevOps access (project + repo)❌ not needed✅ mandatory✅ mandatory
Configured pool (cicd.buildPool) authorized for the project❌✅✅
Build agent online❌✅✅
A <SERVER>_DEPLOY agent per environment❌❌✅ (one per DEV/DEMO/PROD)
Approvers group in Azure DevOps (≥2)❌❌✅
Variable group for secrets❌❌✅ (if there are secrets)
Health endpoints (/health/live, /ready)optionaloptionalrecommended (strict .NET smoke)

And on GitHub Actions

What you need on Azure DevOpsThe GitHub equivalent
Pool {{BUILD_POOL}} authorized + a build agent (cicd.buildAgent)A hosted runner (ubuntu-latest) or self-hosted; nothing to authorize
<ENV>_DEPLOY agents with DeployTargetOIDC to the cloud (id-token: write) or a self-hosted runner with access to the target
Approvers group (≥2)Required reviewers on the pro environment (public repositories or a Team/Enterprise plan)
Variable group for secretsEnvironment/repository secrets (gh secret set --env)
Build validation branch policyA ruleset with the Build/Security checks + a merge queue (git-best-practices)
Registering the definition (PHASE 2.5)Does not exist: a workflow counts simply by being in .github/workflows/

Detail, commands and opt-in security: GUIA_GITHUB_ACTIONS.md.


Anti-patterns (what NOT to do)

  • ❌ Jumping straight from phase 0 to phase 2: the command's PHASE 0.5 edit mode allows it, but skipping the middle phase means the first PROD failure will be catastrophic (no practice with phase 1).
  • ❌ Asking for phase 2 without <ENV>_DEPLOY agents: the wizard detects it in the PHASE 0.4 pre-flight and aborts with a clear message.
  • ❌ Treating phase 0 as "we do not do CI/CD": phase 0 IS CI/CD — the first barrier (Ovillo locally with /hv:verify's 7 phases) is what keeps real bugs out of manual deployments.
  • ❌ Editing azure-pipelines.yml ignoring G1-G19: the cicd-pipeline-reviewer agent will tell you, but human discipline is cheaper.

When in doubt

Follow this tree:

Do you have Azure DevOps access and the configured pool authorized?
├── NO  → Phase 0
└── YES → Do you have <ENV>_DEPLOY agents online on every target server?
         ├── NO  → Phase 1
         └── YES → Is there an Azure DevOps approvers group with 2 or more members?
                  ├── NO  → Phase 1 (and create the group in parallel)
                  └── YES → Phase 2

If you are not sure, start at phase 0 and move up when the next step is clear. /hv:cicd-init is idempotent — running it again in edit mode breaks nothing.


Updating the pipeline after new versions of Ovillo

There are two layers, and updating one does NOT update the other:

LayerWhat it isHow it is updated
The Ovillo template (.claude/)The tooling: workflows, rules, the cicd-architect skill, the cicd-pipeline-reviewer agent, hooks, templates`irm <distribution.baseUrl>/install.ps1 \iex`
Your azure-pipelines.ymlThe generated artifact: it lives in your repository and runs on Azure DevOps/hv:cicd-init (run again) or by hand

The key point: irm updates the tooling, but it never touches your YAML. The pipeline is yours; improvements to the rules are not imposed on it unless you decide so.

Workflow vs skill vs agent — how to invoke each

  • Workflows (/hv:cicd-init, /hv:cicd-status, /hv:cicd-deploy, /hv:cicd-release): you type them with /.
  • The cicd-architect skill: auto-invoked (it activates by itself when you edit azure-pipelines.yml).
  • The cicd-pipeline-reviewer agent: it is NOT a / workflow (which is why you do not see it in the slash menu). You ask Claude for it — for example "audit my azure-pipelines.yml with the cicd-pipeline-reviewer agent" or "review my pipeline and give me a severity report" — and it runs as a subagent.
  1. Update the template: irm … | iex (it brings new rules and templates).
  2. Audit your YAML against the current rules: ask Claude to run the cicd-pipeline-reviewer agent. It gives you the "conformance diff" (which new rules your pipeline does not meet). If it comes out clean, there is nothing to do.
  3. If there are findings you want to apply: run /hv:cicd-init again. Its PHASE 0.5 (edit mode, rule R14, idempotence):
    • takes an automatic backup (.azure-pipelines.bak.<date>.yml),
    • shows the diff before touching anything,
    • offers five options: add a stage / modify a stage / regenerate the docs / update the whole YAML / exit,
    • preserves your # CUSTOM: ... # /CUSTOM blocks and your own variables.
  4. Commit and push the YAML in your repository → the push triggers the build and confirms it is still green. The definition in Azure DevOps is not registered again (it already exists).
  5. Changing phase (0→1→2): the same /hv:cicd-init adds the new stages (on-demand deploy with DeployEnv R20, the R22 security gate, rollback, and so on).

What forces you to touch the YAML (and what does not)

Kind of improvement in OvilloTouch the YAML?
Audit only (the reviewer detects more things)No, unless you want to fix a finding
A change in the template (a new canonical step)/hv:cicd-init, option "update the YAML", brings it in (preserving your customs)
A new phase / CD/hv:cicd-init adds the stages
Changes only in hooks / workflows / skillsDoes not affect the YAML

Guarantee: running /hv:cicd-init again never overwrites your work (backup + diff + confirmation + it preserves # CUSTOM). It is safe to do on every update, to re-sync the pipeline with the current rules.

Example (a phase-1 project that only refreshes the tooling): if the version's news are about phase 2 (deployment) or another stack, your phase-1 YAML needs no changes — irm … | iex is enough. You only run /hv:cicd-init again when you want to move up a phase or apply a template change.


Document generated by Ovillo — CI/CD integration. The "Updating the pipeline" section was added 2026-06-02.

Fuente: ovillo/_patron/08_CICD/GUIA_FASES_ADOPCION_EN.md

Ovillo v1.31.0tag v1.31.0 (2026-10-06) · sin decisiones posteriores69 skills · 19 agents · 22 hooks · 3 reglas · 15 tools · 103 decisionesfuente: ovillo/_patron/08_CICD/GUIA_FASES_ADOPCION_EN.mdCopyright 2026 Hugo Valer Rojas · Apache-2.0