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

Runbook — Updating the pipeline after a template refresh

5 minlectura
1060palabras
8secciones
2026-09-22última edición
1cambios

When to use it: after running irm | iex (an Ovillo update) on a project that already has CI/CD (phase 1/2). The irm refreshes the tooling (.claude/, including the pipeline templates of the cicd-architect skill), but it does NOT touch your azure-pipelines.yml, which is an artifact that was already generated. For your pipeline to pick up the latest (new G1-G19 invariants, coverage gate, security gate, HTML report, branch-gated, and so on) you have to regenerate it with /hv:cicd-init (idempotent edit mode).

Audience: developer on the consuming project. Platform: Azure DevOps (Server or Services) or GitHub Actions; on GitHub the file is .github/workflows/cd-<slug>.yml and the self-check takes -GitHub.


0. Prerequisites

  • The irm | iex finished OK (update mode; a non-destructive refresh of .claude/).
  • Tooling version up to date: VERSION.json (or a session banner with no ^update marker).
  • git status clean (or only your own uncommitted changes) before regenerating.
  • You know which stack your project is: .NET (dotnet/SDK-style), .NET Framework 4.8 (netfx), Vue+Vite (spa) or .NET tool. Template improvements are usually per stack.

1. Regenerate the pipeline

  • Open Claude Code at the root of the project and run: /hv:cicd-init.
  • It must detect the existing pipeline → it goes into EDIT mode (PHASE 0.5), not a fresh install.
  • Choose option 4, "Update the whole YAML to the latest template". This re-renders the WHOLE YAML from the template (it does NOT patch line by line) and re-applies your # CUSTOM: blocks.
  • Confirm that it detected your stack correctly.

2. Review the DIFF before accepting (KEY STEP)

Regenerating brings everything accumulated since you generated your pipeline, not just the last change. Check:

  • The coverage gate (R18) uses - template: steps/coverage-gate.yml → ops/cicd/scripts/coverage-gate.ps1 (a script from the repository, materialized by /hv:cicd-init; no external tools and no feeds).
  • The R18 gate gates on line/branch (-ThresholdLine/-ThresholdBranch), WARN-first (-Mode block to block); it does not compute CRAP (that is published by the quality record in the Hub, see step 4).
  • (.NET stack) dotnet test emits Format=cobertura,opencover plus the HTML report steps (ReportGenerator) and Publish CoverageReport (additive, continueOnError, it does NOT gate).
  • The security gate (R22) is wired in (scan on build + verdict on deploy).
  • YOUR customizations are still there (IIS paths/iisPhysicalPath, test projects, secrets through a variable group, and so on). If they are not inside # CUSTOM: ... # /CUSTOM blocks, re-apply them.
  • Nothing forbidden sneaks in (R1/Azure DevOps table): deploymentGroup, Cache@2, DeployEnv in variables, pool.name pointing at a deployment pool, and so on.

2-bis. Completeness self-check (KEY STEP — h13)

The command runs validate-pipeline-complete.ps1 (PHASE 2.8) after regenerating: it checks that the YAML contains all the canonical steps of the template (it derives the markers from the template itself). This prevents the partial-edit failure (regenerating halfway and leaving out new steps such as the R18 gate or the CoverageReport HTML report).

  • The self-check comes out green (exit 0). If it comes out red (exit 1) it lists the missing steps → do not accept the change: re-render (full option 4) until it passes. The command must not finish with the self-check in red.
  • A legitimate exception: if you removed optional steps on purpose (no test project → no R18 gate; no /health → best-effort smoke), those missing markers are expected (the command exempts them with -Allow). Any OTHER missing one really is an incomplete regeneration.
  • The YAML carries a template stamp in its header (# Ovillo cicd-architect <stack> @ vX.Y.Z (tpl <hash12>) ...). The tpl <hash12> token is the content hash of the stack's template: /hv:cicd-status only warns about drift if that template really changed (not on every release). If it warns, come back to this runbook. (Pipelines stamped by an older version carry zip <sha12>; a re-render migrates them.)

3. Apply and publish

  • Accept the change (a backup is left at .azure-pipelines.bak.<date>.yml → your immediate rollback).
  • git add azure-pipelines.yml (+ steps/*.yml if they were regenerated).
  • git commit -m "ci: pipeline up to date with the latest Ovillo template".
  • git push → triggers the build.

4. Verify in the build

  • Log of the G7/R18 gate: G7: coverage line=..% branch=..% (confirms the script ran and which XML it read).
  • (.NET stack) the HTML report step green; the CoverageReport artifact published (HTML with coverage and, if there is OpenCover, CRAP / complexity / risk hotspots).
  • R18 gate = WARN on line/branch (it does not block by default).
  • R22 gate (security) according to the environment (DEV WARN / PRE-PROD BLOCK, or WARN for brownfield).
  • The build overall green.

5. If something fails

SymptomLikely causeAction
HTML report without CRAP/hotspotsThe report was generated from Cobertura, not OpenCoverCheck Format=cobertura,opencover and that ReportGenerator receives the *.opencover.xml
The gate reports SKIPPEDThere is no coverage XML under $(Agent.TempDirectory)Check --settings ops/testing/coverlet.runsettings on dotnet test
A false 0% coverageFINDING H: $(Agent.TempDirectory) is not cleaned between buildsThe regenerated YAML already cleans *cobertura/*opencover.xml before the test and sorts by LastWriteTime
The build does not queue (notStarted)The pipeline is not authorized for the configured pool (cicd.buildPool)"Permit" in the banner / pool admin (TEC-003)
dotnet test says "No test result files"--results-directory was added to the argsDo NOT add it: the task already injects it (TRAP, FINDING H)
  • Rollback: restore .azure-pipelines.bak.<date>.yml + git checkout azure-pipelines.yml.
  • Record any ecosystem problem in _hilo/FEEDBACK_ECOSISTEMA.md (FB-XXX) → /hv:hub-client.

Notes

  • The HTML coverage report is additive and continueOnError: in the worst case the artifact does not appear, but it never takes the build down and never changes the gate.
  • To avoid regenerating everything (just to apply one specific change), you can edit azure-pipelines.yml by hand and ask the cicd-pipeline-reviewer agent to audit it against G1-G19. But /hv:cicd-init (edit mode) is the canonical, idempotent path.
  • See also: AUDITAR_PIPELINE.md, GUIA_FASES_ADOPCION.md and the cicd-runtime rule (G1-G19).

_patron/08_CICD — Ovillo. Runbook for updating a pipeline after a template refresh.

Fuente: ovillo/_patron/08_CICD/RUNBOOK_ACTUALIZAR_PIPELINE_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/RUNBOOK_ACTUALIZAR_PIPELINE_EN.mdCopyright 2026 Hugo Valer Rojas · Apache-2.0