Commit Graph

4 Commits

Author SHA1 Message Date
Jon Chery 5c07fafa18 fix(P1): add CI_GITEA_TOKEN for shell-isolated env forwarding
Release / ci (push) Failing after 7m30s
Release / container-orca (push) Has been skipped
Release / container-traefik (push) Has been skipped
CoreCI's buildIsolatedEnv only forwards CI_* and CORECI_* prefixed vars
from os.Environ(). GITEA_TOKEN is not prefixed, so it's only available
if it's in the job vars map (via ${{ secrets.GITEA_TOKEN }}). The
secret resolver's os.Getenv fallback should work, but to be safe, also
set CI_GITEA_TOKEN in the workflow env (always forwarded as a CI_* var).

Add debug output for GITEA_TOKEN length and CI context vars.

---ci---
project: orca
phase: 1
milestone: v0.16
status: execute
---/ci---
2026-08-12 22:10:16 +00:00
Jon Chery fed24b93e9 fix(P1): drop embed build tag — coreci run doesn't need web assets
Release / ci (push) Failing after 6m12s
Release / container-orca (push) Has been skipped
Release / container-traefik (push) Has been skipped
The embed build tag requires web/build (SvelteKit SPA) and bin/coreci-func
(Rust sidecar) — both are gitignored generated artifacts not present in
a shallow clone. coreci run only needs the CLI (no web UI), so building
without embed works: assets.go (!embed tag) returns ErrNoEmbeddedAssets
which is only referenced by the server's static asset serving, not by
the run command.

---ci---
project: orca
phase: 1
milestone: v0.16
status: execute
---/ci---
2026-08-12 21:11:56 +00:00
Jon Chery 3be86e6daf fix(P1): Gitea Actions clone auth + .coreci.yml native format rewrite (REQ-183,184)
Release / ci (push) Failing after 5m13s
Release / container-orca (push) Has been skipped
Release / container-traefik (push) Has been skipped
REQ-183: Fix .gitea/workflows/release.yml — the git clone of the private
coreci repo failed because the clone command had no credentials. The
actions/checkout@v4 step only injects auth for the orca repo. Fix: pass
GITEA_TOKEN env to the Install CoreCI step and embed it in the clone
URL (https://cloudinit-bot:${GITEA_TOKEN}@git.cloudinit.dev/...).

REQ-184: Rewrite .coreci.yml from the invalid pipelines:/steps:/image:/
commands: format to CoreCI's native jobs:/plugin:/invoke:/vars: format
with a proper DAG (needs:). CoreCI's Pipeline struct only recognizes
jobs:/services:/env: top-level keys — unknown fields are silently dropped
by yaml.Unmarshal, producing an empty Jobs map → zero jobs execute.
The rewrite:
- 8 jobs: go-vet → fan-out (verify-reqs, gosec, govulncheck, gitleaks)
  → build → test → release
- plugin: docker://golang:1.25.12 + invoke: on each job (container path
  with shell-isolated fallback — Go is installed on the runner)
- GITEA_TOKEN via vars: with ${{ secrets.GITEA_TOKEN }} (resolved from
  env via CoreCI's secret resolver os.Getenv fallback)
- CI_COMMIT_BRANCH (tag name on tag push) and CI_COMMIT_SHA for version
  injection — no ${VAR} interpolation in YAML fields (shell expansion
  only works inside invoke: via sh -c)
- No apk add (runner is ubuntu, not alpine — uses curl for tool downloads)
- Release job handles duplicate release (ship workflow creates release
  first with title+body; coreci run attaches binary assets later via API
  fallback if tea releases create fails)
- Release job verifies asset count ≥ 2 (REQ-097 gate C-21) with retry

Root cause: all 87 releases in repo history had zero binary assets
because coreci run never executed any jobs (empty Jobs map from the
invalid format) and the Gitea Actions workflow failed before reaching
coreci run (private repo clone had no credentials).

---ci---
project: orca
phase: 1
milestone: v0.16
status: execute
requirements:
  covered: [183, 184]
  partial: []
---/ci---
2026-08-12 21:05:21 +00:00
Jon Chery eadf2cc2c5 fix(P1): Gitea Actions workflow + kaniko container publishing (REQ-180,181)
Release / ci (push) Failing after 4m55s
Release / container-orca (push) Has been skipped
Release / container-traefik (push) Has been skipped
New .gitea/workflows/release.yml:
  - Triggers on push: tags: ['v*'] (deterministic)
  - Job 'ci': checkout + install Go + install coreci binary +
    coreci run (executes .coreci.yml: validate, build, test, release)
  - Job 'container-orca': kaniko executor:debug with --entrypoint
    /bin/sh, builds+pushes orca image (no DinD)
  - Job 'container-traefik': same, builds+pushes orca-traefik image
    (skips if Dockerfile.traefik absent at that tag)
  - Uses PAT_TOKEN secret (Gitea reserves GITEA_ prefix)

.coreci.yml:
  - Removed container-publish + container-publish-traefik steps
    (moved to Gitea Actions — CoreCI's podman executor appends sh -c
    which conflicts with kaniko's /kaniko/executor entrypoint)
  - Keeps validate/build/test/release (tarball + Gitea release)

scripts/trigger_coreci.sh:
  - Added tag ref handling (refs/tags/*) so pre-push hook triggers
    CoreCI for tag pushes too (Gitea Actions webhook is secondary)

---ci---
project: orca
phase: 1
milestone: v0.15
status: execute
---/ci---
2026-08-10 20:59:10 +00:00