Skip to content
Merged
219 changes: 170 additions & 49 deletions .claude/skills/create-vortex-tooling-release-notes/SKILL.md

Large diffs are not rendered by default.

293 changes: 183 additions & 110 deletions .claude/skills/prepare-vortex-release/SKILL.md

Large diffs are not rendered by default.

313 changes: 227 additions & 86 deletions .claude/skills/propagate-vortex-main-to-2x/SKILL.md

Large diffs are not rendered by default.

73 changes: 52 additions & 21 deletions .claude/skills/update-vortex-ci-runner/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,31 @@ user-invocable: true

# Vortex Update CI Runner

Two-phase workflow for verifying a new `drevops/ci-runner` release on a Vortex-based Drupal project:
Two-phase workflow for verifying a new `drevops/ci-runner` release on a
Vortex-based Drupal project:

- **Phase 1 (Canary):** Switch all `drevops/ci-runner` image references to `:canary` (no SHA pin), open a PR, monitor CI. If green, STOP and notify the user so they can cut the official release.
- **Phase 2 (Release):** After the user confirms a release version, roll the same PR forward to pin `:NEW_VERSION@sha256:NEW_SHA`, push, monitor CI. On green, notify the user the PR is ready to merge.
- **Phase 1 (Canary):** Switch all `drevops/ci-runner` image references to
`:canary` (no SHA pin), open a PR, monitor CI. If green, STOP and notify
the user so they can cut the official release.
- **Phase 2 (Release):** After the user confirms a release version, roll the
same PR forward to pin `:NEW_VERSION@sha256:NEW_SHA`, push, monitor CI. On
green, notify the user the PR is ready to merge.

## When to Use

- User says 'test ci-runner canary' / 'switch ci-runner to canary' / 'try the new ci-runner'.
- User says 'update ci-runner to X.Y.Z' (skip to Phase 2 if no canary needed).
- User says 'test ci-runner canary' / 'switch ci-runner to canary' / 'try
the new ci-runner'.
- User says 'update ci-runner to X.Y.Z' (skip to Phase 2 if no canary
needed).
- Vortex release prep needs a ci-runner verification.

Do NOT use for `uselagoon/*` images (Renovate handles those) or `ci-builder` (different image).
Do NOT use for `uselagoon/*` images (Renovate handles those) or `ci-builder`
(different image).

## Prerequisites

- Working in a Vortex-based project (look for `.vortex/` directory or `drevops/ci-runner` references).
- Working in a Vortex-based project (look for `.vortex/` directory or
`drevops/ci-runner` references).
- `gh` CLI authenticated.
- Docker available (only needed for the Phase 2 SHA lookup).
- Clean working tree.
Expand All @@ -30,23 +39,28 @@ Do NOT use for `uselagoon/*` images (Renovate handles those) or `ci-builder` (di

### 1. Discover references

The file list is not fixed: older or downstream projects may have it in more places. Always rediscover.
The file list is not fixed: older or downstream projects may have it in more
places. Always rediscover.

```bash
grep -rln "drevops/ci-runner" --include="*.yml" .
```

Repeat for `*.yaml` and `Dockerfile*`. **Exclude `*/tests/Fixtures/*` and `*/test/Fixtures/*` paths** since those are snapshots used by installer tests, not live CI configs.
Repeat for `*.yaml` and `Dockerfile*`. **Exclude `*/tests/Fixtures/*` and
`*/test/Fixtures/*` paths** since those are snapshots used by installer
tests, not live CI configs.

Record the current version and SHA before changing anything: you need to know what you are rolling forward from in case of rollback.
Record the current version and SHA before changing anything: you need to
know what you are rolling forward from in case of rollback.

### 2. Branch

```bash
git checkout -b feature/update-ci-runner
```

This branch is reused for Phase 2; do not create a new branch when the release version is provided.
This branch is reused for Phase 2; do not create a new branch when the
release version is provided.

### 3. Replace image references

Expand All @@ -62,9 +76,13 @@ with:
drevops/ci-runner:canary
```

**Drop the SHA pin in canary mode.** Pinning a SHA defeats the canary: CI re-runs would test the same frozen build, not whatever the `canary` tag currently points to. The whole point of the canary phase is to track a moving target.
**Drop the SHA pin in canary mode.** Pinning a SHA defeats the canary: CI
re-runs would test the same frozen build, not whatever the `canary` tag
currently points to. The whole point of the canary phase is to track a
moving target.

Use the `Edit` tool with `replace_all: true` per file. Verify with grep afterwards: the only remaining hits should be in fixture paths.
Use the `Edit` tool with `replace_all: true` per file. Verify with grep
afterwards: the only remaining hits should be in fixture paths.

### 4. Commit and push

Expand All @@ -90,28 +108,38 @@ Invoke the `/open-pr` skill. PR title:
Tested 'drevops/ci-runner' canary build.
```

PR body should note: this is a canary test (NOT for merge yet), the previous pinned version, files changed, and that the next step is for the user to release a new `drevops/ci-runner` once CI passes.
PR body should note: this is a canary test (NOT for merge yet), the previous
pinned version, files changed, and that the next step is for the user to
release a new `drevops/ci-runner` once CI passes.

### 6. Monitor CI

Watch GitHub Actions via `gh pr checks <PR>` and CircleCI via the PR link.

**On failure:** Diagnose before reporting. Common causes:

- **Tool version drift** in canary (PHP, Node, Composer bumped in the ci-runner image but pinned in project configs: `composer.json` `config.platform.php`, `phpstan.neon` `phpVersion`, `phpcs.xml` `testVersion`).
- **Tool version drift** in canary (PHP, Node, Composer bumped in the
ci-runner image but pinned in project configs: `composer.json`
`config.platform.php`, `phpstan.neon` `phpVersion`, `phpcs.xml`
`testVersion`).
- A tool removed from the canary image.
- Cache key issues (rare: cache keys are tied to Lagoon versions, not ci-runner).
- Cache key issues (rare: cache keys are tied to Lagoon versions, not
ci-runner).
- Image pull / registry timeout.

Report with: failing job name, failing step, ~30 lines of the most relevant log, and your hypothesis. Do not paste raw logs without a hypothesis.
Report with: failing job name, failing step, ~30 lines of the most relevant
log, and your hypothesis. Do not paste raw logs without a hypothesis.

**On success:** STOP. Do not merge. Tell the user:

> Canary verification passed: CI is green on `<PR URL>`. Ready for you to cut the new `drevops/ci-runner` release. Let me know the new version (e.g. `26.4.0`) when ready.
> Canary verification passed: CI is green on `<PR URL>`. Ready for you to
> cut the new `drevops/ci-runner` release. Let me know the new version (e.g.
> `26.4.0`) when ready.

## Phase 2: Release Pin

Triggered when the user confirms a new released version (e.g. 'released as 26.4.0').
Triggered when the user confirms a new released version (e.g. 'released as
26.4.0').

### 1. Get the SHA digest

Expand All @@ -125,7 +153,9 @@ docker inspect --format="{{index .RepoDigests 0}}" drevops/ci-runner:<NEW_VERSIO

The output is `drevops/ci-runner@sha256:<HASH>`. Record `<HASH>`.

If docker is unavailable, use `docker manifest inspect drevops/ci-runner:<NEW_VERSION>` and read the linux/amd64 digest.
If docker is unavailable, use
`docker manifest inspect drevops/ci-runner:<NEW_VERSION>` and read the
linux/amd64 digest.

### 2. Replace canary references

Expand Down Expand Up @@ -170,7 +200,8 @@ Do NOT merge: the user merges.
## Red Flags

- About to pin a SHA in Phase 1: don't. Canary needs the moving tag.
- About to edit a file under `tests/Fixtures/`: don't. Those are test snapshots.
- About to edit a file under `tests/Fixtures/`: don't. Those are test
snapshots.
- About to merge the PR: don't. User merges.
- About to use `gh pr create`: don't. Use `/open-pr`.
- About to start Phase 2 without Phase 1 CI green: confirm with user first.
Expand Down
Loading
Loading