|
2 | 2 |
|
3 | 3 | `updateDigests.sh` also updates `.tekton-templates/*.yaml` via `TEMPLATEPATH`. |
4 | 4 |
|
5 | | -## Files to update |
| 5 | +Detect which variant applies **before** editing (see table below). Edit **templates and shared pipelines first**, then regenerate or patch PLRs. |
6 | 6 |
|
7 | | -Edit **templates first**, then regenerate or patch PLRs. |
| 7 | +## Layout detection |
| 8 | + |
| 9 | +| Marker | Variant | Typical branches | |
| 10 | +|--------|---------|------------------| |
| 11 | +| `.tekton-templates/rhdh-pipeline.yaml` | **Unified** — one `pipelineSpec` template + `components.yaml` | `rhdh-1-rhel-9`, `rhdh-1.10-rhel-9`, … | |
| 12 | +| `.tekton-templates/rhdh-hub.yaml` (no `rhdh-pipeline.yaml`) | **Shared build-pipeline** — PLR wrappers + `build-pipeline-rhdh-*.yaml` | `rhdh-1.9-rhel-9` | |
| 13 | + |
| 14 | +If unsure, run: `ls .tekton-templates/rhdh-pipeline.yaml .tekton-templates/rhdh-hub.yaml 2>/dev/null` |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Variant A: Unified pipeline layout |
| 19 | + |
| 20 | +Used on current stable branches. Hub, operator, and must-gather share `rhdh-pipeline.yaml`; operator-bundle uses a separate template. |
| 21 | + |
| 22 | +### Files to update |
8 | 23 |
|
9 | 24 | | Location | When to edit | |
10 | 25 | |----------|----------------| |
11 | 26 | | `.tekton-templates/rhdh-pipeline.yaml` | hub, operator, must-gather | |
12 | 27 | | `.tekton-templates/rhdh-operator-bundle.yaml` | operator-bundle (different task set) | |
13 | | -| `.tekton-templates/components.yaml` | Metadata for `generatePipelineRuns.sh` | |
14 | | -| `.tekton/rhdh-hub-<N>-{push,pull}.yaml` | From `rhdh-pipeline.yaml` | |
15 | | -| `.tekton/rhdh-operator-<N>-{push,pull}.yaml` | From `rhdh-pipeline.yaml` | |
16 | | -| `.tekton/rhdh-must-gather-<N>-{push,pull}.yaml` | From `rhdh-pipeline.yaml` | |
17 | | -| `.tekton/rhdh-operator-bundle-<N>-{push,pull}.yaml` | From `rhdh-operator-bundle.yaml` | |
18 | | -| `.tekton/rhdh-rag-content-<N>-{push,pull}.yaml` | Inline `pipelineSpec` — edit directly | |
19 | | -| `.tekton/fbc-<version>-push.yaml` | FBC pipelines; often `build-image-index` without prefetch | |
| 28 | +| `.tekton-templates/components.yaml` | Metadata for `generatePipelineRuns.sh` only | |
| 29 | +| `.tekton/rhdh-hub-<N>-{push,pull}.yaml` | Regenerate from `rhdh-pipeline.yaml` | |
| 30 | +| `.tekton/rhdh-operator-<N>-{push,pull}.yaml` | Regenerate from `rhdh-pipeline.yaml` | |
| 31 | +| `.tekton/rhdh-must-gather-<N>-{push,pull}.yaml` | Regenerate from `rhdh-pipeline.yaml` | |
| 32 | +| `.tekton/rhdh-operator-bundle-<N>-{push,pull}.yaml` | Regenerate from `rhdh-operator-bundle.yaml` | |
| 33 | +| `.tekton/rhdh-rag-content-<N>-{push,pull}.yaml` | Inline `pipelineSpec` — **edit directly** (not in `components.yaml`) | |
| 34 | +| `.tekton/fbc-<version>-push.yaml` | FBC; `build-image-index` without prefetch | |
20 | 35 | | `.tekton/images-mirror-set.yaml` | Only if task bundles are referenced | |
21 | 36 |
|
22 | | -## Regenerate |
| 37 | +### Regenerate |
23 | 38 |
|
24 | 39 | ```bash |
25 | 40 | cd .tekton |
26 | | -./generatePipelineRuns.sh -t <x.y> |
| 41 | +./generatePipelineRuns.sh -t <x.y> # e.g. 1, 1.10 |
27 | 42 | ``` |
28 | 43 |
|
29 | | -Updates `rhdh-*-{push,pull}.yaml` and FBC `target_branch` placeholders in `fbc-*-push.yaml`. |
| 44 | +- Version `1` → files like `rhdh-hub-1-push.yaml`, branch `rhdh-1-rhel-9` |
| 45 | +- Version `1.10` → `rhdh-hub-1-10-push.yaml`, branch `rhdh-1.10-rhel-9` |
| 46 | +- Updates component PLRs from templates and FBC `target_branch` in `fbc-*-push.yaml` |
| 47 | + |
| 48 | +### Generator notes |
| 49 | + |
| 50 | +- Migrations: edit `pipelineSpec.params` and task `params` in `rhdh-pipeline.yaml` / `rhdh-operator-bundle.yaml`. |
| 51 | +- `components.yaml` only when extending generator placeholders (output image, prefetch, storage, etc.). |
| 52 | +- After `updateDigests.sh`, **always** run `generatePipelineRuns.sh` if templates were migrated earlier than PLRs (stale PLRs may still have `dev-package-managers`). |
| 53 | + |
| 54 | +--- |
| 55 | + |
| 56 | +## Variant B: Shared build-pipeline layout (1.9) |
| 57 | + |
| 58 | +Older branch layout. Hub and operator PLRs are thin wrappers (`pipelineRef`); Tekton `Pipeline` objects hold the real `pipelineSpec`. |
| 59 | + |
| 60 | +### Files to update |
| 61 | + |
| 62 | +| Location | When to edit | |
| 63 | +|----------|----------------| |
| 64 | +| `.tekton/build-pipeline-rhdh-hub.yaml` | Shared pipeline (hub + operator-bundle paths when `component-type` matches) | |
| 65 | +| `.tekton/build-pipeline-rhdh-operator.yaml` | Shared pipeline for operator (parallel structure to hub file) | |
| 66 | +| `.tekton-templates/rhdh-hub.yaml` | PLR wrapper — pass new **pipeline** params in `spec.params` | |
| 67 | +| `.tekton-templates/rhdh-operator.yaml` | PLR wrapper — same | |
| 68 | +| `.tekton-templates/rhdh-operator-bundle.yaml` | Inline `pipelineSpec` in template (like unified bundle) | |
| 69 | +| `.tekton/rhdh-hub-<N>-{push,pull}.yaml` | Regenerate from `rhdh-hub.yaml` | |
| 70 | +| `.tekton/rhdh-operator-<N>-{push,pull}.yaml` | Regenerate from `rhdh-operator.yaml` | |
| 71 | +| `.tekton/rhdh-operator-bundle-<N>-{push,pull}.yaml` | Regenerate from `rhdh-operator-bundle.yaml` | |
| 72 | +| `.tekton/fbc-<version>-push.yaml` | FBC pipelines | |
| 73 | +| `.tekton/build-pipeline-rhdh-hub.yaml` | Also updated by `updateDigests.sh` (not a template) | |
| 74 | + |
| 75 | +No `must-gather` or `rag-content` PLRs on this layout. |
| 76 | + |
| 77 | +### Regenerate |
| 78 | + |
| 79 | +```bash |
| 80 | +cd .tekton |
| 81 | +./generatePipelineRuns.sh -t <x.y> # e.g. 1.9 |
| 82 | +``` |
| 83 | + |
| 84 | +Produces `rhdh-{hub,operator,operator-bundle}-1-9-{push,pull}.yaml` via `sed` on per-component templates; updates FBC `target_branch` to `rhdh-1.9-rhel-9`. |
| 85 | + |
| 86 | +### Migration: `prefetch-dependencies-oci-ta` 0.3 |
| 87 | + |
| 88 | +Apply in **three** places: |
| 89 | + |
| 90 | +1. **Pipeline params** on `build-pipeline-rhdh-hub.yaml` and `build-pipeline-rhdh-operator.yaml`: |
| 91 | + - Add `enable-package-registry-proxy` (default `"true"`). |
| 92 | +2. **Prefetch tasks** `prefetch-dependencies-hub` and `prefetch-dependencies-operator`: |
| 93 | + - Remove `dev-package-managers`; pass `enable-package-registry-proxy: $(params.enable-package-registry-proxy)`. |
| 94 | +3. **PLR templates** `rhdh-hub.yaml` / `rhdh-operator.yaml`: |
| 95 | + - Add `spec.params` entry so the value reaches the shared pipeline. |
| 96 | +4. **Operator-bundle template** `rhdh-operator-bundle.yaml`: |
| 97 | + - Same as unified layout (inline `pipelineSpec`). |
| 98 | + |
| 99 | +`prefetch-dependencies-bundle` uses non-OCI `task-prefetch-dependencies` — no `enable-package-registry-proxy` change unless MIGRATION.md says so. |
| 100 | + |
| 101 | +### Generator notes |
| 102 | + |
| 103 | +- `generatePipelineRuns.sh` does **not** rewrite `build-pipeline-*.yaml`; edit those files directly for task/digest/migration changes. |
| 104 | +- PLR `pipelineRef.name` must match pipeline metadata (`build-pipeline-rhdh-hub` / `build-pipeline-rhdh-operator`) — generated files already do. |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +## Both variants: commit locally, do not push |
| 109 | + |
| 110 | +Typical outcome on a branch: |
30 | 111 |
|
31 | | -## Generator: template changes |
| 112 | +1. `updateDigests.sh --minor --no-push` → **one local commit** (digest bumps). |
| 113 | +2. Migration edits + `generatePipelineRuns.sh` → **second commit** (or leave unstaged for human review). |
32 | 114 |
|
33 | | -- Edit `pipelineSpec.params` and task `params` in `rhdh-pipeline.yaml` / `rhdh-operator-bundle.yaml`. |
34 | | -- `components.yaml` only if extending `generatePipelineRuns.sh` placeholders for per-component PLR params. |
| 115 | +Human reviews the full diff across `.tekton/` and `.tekton-templates/`, then pushes or opens a PR. |
0 commit comments