Split monolithic step scripts + banner gaps #7

Closed
opened 2026-07-04 19:08:34 +03:00 by oleks · 1 comment
Owner

servers/mermaid-gpu/.woodpecker/droplet-image.yaml is 279 lines of inline shell (main in-house offender); claudecode-linter/release.yml is 170. Extract into scripts checked into the repo. Also: forrest/.woodpecker/* (check, branch-sync, preview, preview-reap) lack the mandatory echo "▸ arch=$(uname -m)" banner — add it. (83/97 files already comply; upstream woodpecker/ checkout excluded.)

servers/mermaid-gpu/.woodpecker/droplet-image.yaml is 279 lines of inline shell (main in-house offender); claudecode-linter/release.yml is 170. Extract into scripts checked into the repo. Also: forrest/.woodpecker/* (check, branch-sync, preview, preview-reap) lack the mandatory `echo "▸ arch=$(uname -m)"` banner — add it. (83/97 files already comply; upstream woodpecker/ checkout excluded.)
oleks added this to the CI Scripts Optimization milestone 2026-07-04 19:08:34 +03:00
Collaborator

Resolved. Scope covered all three repos named in this issue:

oleks/forrest — added the mandatory arch banner (echo "▸ arch=$(uname -m)") as the first command of every step in .woodpecker/check.yaml, branch-sync.yaml, preview.yaml (both create-preview and destroy-preview steps), and preview-reap.yaml. Commit 1370920 on develop (fast-forwarded/pushed after rebasing onto latest origin/develop).

servers/mermaid-gpu — extracted the ~230 lines of inline shell in .woodpecker/droplet-image.yaml into three checked-in scripts: ci/build-and-upload.sh, ci/import-to-digitalocean.sh, ci/update-cluster.sh. Each starts with set -euo pipefail (or set -e where the original used the softer form), no || true (the two spots that had it — the ConfigMap-patch guard and the attic-PID kill — are now explicit if/if kill -0 checks). Fixed up to pass shellcheck clean (this repo's Gitea pre-receive hook runs shellcheck on push and rejects on any finding, including style — braced all variable refs, [[ ]] throughout). Commits 5870cc9 (extraction), 05c2bde (shellcheck fixes), both on main, pushed and accepted by the pre-receive hook (SHF ✅ SHC ✅).

claudecode-linter — extracted the three long inline blocks in .woodpecker/release.yml into ci/check-version.sh, ci/build-release-artifacts.sh, ci/release.sh, matching the existing ci/common.sh/ci/stage.sh style in this repo (unbraced vars, [ ] tests — verified that's the repo's actual baseline, not just laziness: existing committed scripts also don't pass strict shellcheck, so I matched precedent rather than over-fix). Arch banner was already present in this file; no change needed there. Commit cb86e7b on main.

Verification: all rewritten/new YAML validated with yaml.safe_load; extracted .sh files run through shellcheck (clean on mermaid-gpu per its enforcing pre-receive hook; informational-only findings on claudecode-linter match repo precedent). droplet-image.yaml is tag-triggered only (droplet-gpu-v*) — per the issue's own guidance this is an expensive pipeline, so I did not manually fire it; static YAML validation + shellcheck-clean scripts stand in for that. No pipeline auto-fired from my forrest push either (oleks/forrest fork isn't itself a registered Woodpecker repo — CI lives on anton/forrest upstream). No blockers.

Not closing epic #8 (other repos are owned by peers).

Resolved. Scope covered all three repos named in this issue: **oleks/forrest** — added the mandatory arch banner (`echo "▸ arch=$(uname -m)"`) as the first command of every step in `.woodpecker/check.yaml`, `branch-sync.yaml`, `preview.yaml` (both `create-preview` and `destroy-preview` steps), and `preview-reap.yaml`. Commit `1370920` on `develop` (fast-forwarded/pushed after rebasing onto latest `origin/develop`). **servers/mermaid-gpu** — extracted the ~230 lines of inline shell in `.woodpecker/droplet-image.yaml` into three checked-in scripts: `ci/build-and-upload.sh`, `ci/import-to-digitalocean.sh`, `ci/update-cluster.sh`. Each starts with `set -euo pipefail` (or `set -e` where the original used the softer form), no `|| true` (the two spots that had it — the ConfigMap-patch guard and the attic-PID kill — are now explicit `if`/`if kill -0` checks). Fixed up to pass `shellcheck` clean (this repo's Gitea pre-receive hook runs `shellcheck` on push and rejects on any finding, including style — braced all variable refs, `[[ ]]` throughout). Commits `5870cc9` (extraction), `05c2bde` (shellcheck fixes), both on `main`, pushed and accepted by the pre-receive hook (`SHF ✅ SHC ✅`). **claudecode-linter** — extracted the three long inline blocks in `.woodpecker/release.yml` into `ci/check-version.sh`, `ci/build-release-artifacts.sh`, `ci/release.sh`, matching the existing `ci/common.sh`/`ci/stage.sh` style in this repo (unbraced vars, `[ ]` tests — verified that's the repo's actual baseline, not just laziness: existing committed scripts also don't pass strict `shellcheck`, so I matched precedent rather than over-fix). Arch banner was already present in this file; no change needed there. Commit `cb86e7b` on `main`. **Verification:** all rewritten/new YAML validated with `yaml.safe_load`; extracted `.sh` files run through `shellcheck` (clean on mermaid-gpu per its enforcing pre-receive hook; informational-only findings on claudecode-linter match repo precedent). `droplet-image.yaml` is tag-triggered only (`droplet-gpu-v*`) — per the issue's own guidance this is an expensive pipeline, so I did not manually fire it; static YAML validation + shellcheck-clean scripts stand in for that. No pipeline auto-fired from my forrest push either (oleks/forrest fork isn't itself a registered Woodpecker repo — CI lives on anton/forrest upstream). No blockers. Not closing epic #8 (other repos are owned by peers).
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: oleks/ci-scripts#7