437908662f
Phase 1 plan: two independent file fixes (single wave). - Task 1.1 (REQ-183): auth the coreci clone in release.yml - Task 1.2 (REQ-184): rewrite .coreci.yml to CoreCI native jobs: format 9 must-have verification gates defined. ---ci--- project: orca phase: 0 milestone: v0.16 status: plan ---/ci---
3.5 KiB
3.5 KiB
PLAN v0.16: Release Binary Asset Fix
Milestone Summary
Milestone: v0.16 (fix type — tags on v0.15.x patch line) Phases: P0 (pre-execution) → P1 (fix) → P2 (final review+ship) Requirements: REQ-183 (clone auth), REQ-184 (.coreci.yml rewrite)
Phase 1: Fix Gitea Actions clone auth + rewrite .coreci.yml
Wave 1: Both fixes (single wave — they are independent files)
Task 1.1 (REQ-183): Fix .gitea/workflows/release.yml — auth the coreci clone
File: .gitea/workflows/release.yml
Current failing step:
- name: Install CoreCI
run: |
git clone --depth=1 https://git.cloudinit.dev/coreci/coreci.git /tmp/coreci
cd /tmp/coreci
CGO_ENABLED=0 go build -tags sqlite_go,embed -o /usr/local/bin/coreci ./cmd/coreci
coreci version
Fix: add GITEA_TOKEN env and embed in clone URL:
- name: Install CoreCI
env:
GITEA_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
git clone --depth=1 https://cloudinit-bot:${GITEA_TOKEN}@git.cloudinit.dev/coreci/coreci.git /tmp/coreci
cd /tmp/coreci
CGO_ENABLED=0 go build -tags sqlite_go,embed -o /usr/local/bin/coreci ./cmd/coreci
coreci version
Task 1.2 (REQ-184): Rewrite .coreci.yml to CoreCI native jobs: format
File: .coreci.yml
Convert from pipelines:/steps:/image:/commands: to jobs:/plugin:/invoke:/vars: with a DAG.
DAG structure:
go-vet ──→ verify-reqs ──┐
├──→ gosec ────────┤
├──→ govulncheck ──┤──→ build ──→ test ──→ release
└──→ gitleaks ─────┘
Key adaptations:
plugin: docker://golang:1.25.12on each job (container if available, shell-isolated fallback)invoke: |for multi-line commands (shell expansion works viash -c)GITEA_TOKENviavars: { GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} }(resolved from env)CI_COMMIT_BRANCH(tag name on tag push) andCI_COMMIT_SHAfor version injection- No tag-conditional rules (workflow gates on
on: push: tags: ['v*']) releasejob: build tarball + SHA256SUMS, install tea via curl, create release with assets (fallback to Gitea API asset attachment if release exists), verify asset count ≥ 2 (REQ-097 gate C-21)- No
apk add(runner is ubuntu, not alpine)
Must-haves (verification gates)
.gitea/workflows/release.yml"Install CoreCI" step hasGITEA_TOKENenv and token in clone URL.coreci.ymlusesjobs:top-level key (notpipelines:)- Each job has
plugin:and/orinvoke:(mutually exclusive rule) - DAG via
needs:(validate → build → test → release) GITEA_TOKENpassed via jobvars:with${{ secrets.GITEA_TOKEN }}- Release job handles duplicate release (fallback to API asset attachment)
- Release job verifies asset count ≥ 2 (REQ-097)
- No
apk addcommands (ubuntu runner, not alpine) - No
${VAR}interpolation in YAML fields (only ininvoke:via sh -c) make verify-reqspasses (ROADMAP ↔ REQUIREMENTS consistency)
Verification
make verify-reqs— ROADMAP/REQUIREMENTS consistencygo vet ./...— no vet errorsgofmt -l .— no formatting issues- YAML validity check for
.coreci.ymland.gitea/workflows/release.yml - Confirm
.coreci.ymlhasjobs:key and at least 5 jobs (go-vet, verify-reqs, gosec, govulncheck, gitleaks, build, test, release) - Confirm
.gitea/workflows/release.yml"Install CoreCI" step referencesGITEA_TOKEN