Commit Graph

10 Commits

Author SHA1 Message Date
TehRiehlDeal 7b60af21ae fix(ci): read HARBOR_HOST from vars, not secrets
frontend-ci / secrets-scan (push) Successful in 5s
frontend-ci / sast (push) Successful in 9s
frontend-ci / fs-scan (push) Successful in 11s
frontend-ci / typecheck (push) Successful in 14s
frontend-ci / lint (push) Successful in 15s
frontend-ci / build (push) Successful in 38s
frontend-ci / push (push) Successful in 37s
Mirror the backend fix. HARBOR_HOST is a Gitea Actions variable, not
a secret; secrets.HARBOR_HOST was empty the whole time. Use
vars.HARBOR_HOST and drop the now-pointless protocol-strip defense.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 13:09:49 -07:00
TehRiehlDeal b8e6672006 fix(ci): clean HARBOR_HOST once and propagate via GITHUB_ENV
Mirror the backend fix: the pre-check cleaned HARBOR_HOST locally
but subsequent steps (docker login/push, cosign) saw the raw secret
with its https:// prefix, causing docker login to fall back to
docker.io. Do the cleanup once in Compute and write it to GITHUB_ENV
so every later step sees the same normalized value.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 12:55:56 -07:00
TehRiehlDeal f9beb7ad40 fix(ci): better diagnostics for Harbor pre-check
Mirror the backend fix — the curl exit code 6 (DNS failure) was
propagating as a bare step failure with no useful message. Echo the
URL, strip protocol prefix from HARBOR_HOST defensively, and turn
each curl outcome into a clear error or warning.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 12:46:11 -07:00
TehRiehlDeal d36121e673 fix(ci): replace flaky docker/login-action, add cosign and tag back
frontend-ci / secrets-scan (push) Successful in 6s
frontend-ci / fs-scan (push) Successful in 11s
frontend-ci / typecheck (push) Successful in 13s
frontend-ci / lint (push) Successful in 16s
frontend-ci / sast (push) Successful in 18s
frontend-ci / build (push) Successful in 38s
frontend-ci / push (push) Has been skipped
Mirrors the backend push-job rewrite:

- Replace docker/login-action@v3 (fast 1s failure on the Gitea
  runner) with plain `docker login --password-stdin`.
- Read VERSION from package.json (jq), SHA_SHORT from git, publish
  :VERSION, :SHA_SHORT, :latest. Drop floating :1.2, :1 tags.
- Pre-check Harbor for an existing :VERSION artifact and fail early
  with a "bump package.json" message instead of overwriting silently.
- Sign each pushed image with cosign. Signature is on the digest
  (resolved via :SHA_SHORT), so it covers all tags pointing at it.
- After a successful image push, create and push a `v${VERSION}` git
  tag back to origin using the auto-injected token. Tag-push failure
  is a warning, not an error.
- Drop `tags: ["v*"]` from the workflow trigger — CI now creates the
  tag itself, so re-triggering on tag push would loop.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 12:14:56 -07:00
TehRiehlDeal 6fd0df0379 fix(ci): pin setup-node cache-dependency-path on typecheck job
frontend-ci / secrets-scan (push) Successful in 5s
frontend-ci / sast (push) Successful in 8s
frontend-ci / fs-scan (push) Successful in 13s
frontend-ci / lint (push) Successful in 15s
frontend-ci / typecheck (push) Successful in 15s
frontend-ci / build (push) Successful in 37s
frontend-ci / push (push) Has been skipped
frontend-ci / secrets-scan (pull_request) Successful in 4s
frontend-ci / sast (pull_request) Successful in 8s
frontend-ci / fs-scan (pull_request) Successful in 11s
frontend-ci / lint (pull_request) Successful in 14s
frontend-ci / typecheck (pull_request) Successful in 14s
frontend-ci / build (pull_request) Successful in 38s
frontend-ci / push (pull_request) Has been skipped
Lint had it explicit; typecheck relied on setup-node's lockfile
auto-discovery, which can fail with a fast (1s) exit on the Gitea
runner. Mirror the backend fix and set the path explicitly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 11:48:28 -07:00
TehRiehlDeal ebb2d9a2c5 fix(ci): drop flaky GHA cache and merge image-scan into build
frontend-ci / secrets-scan (push) Successful in 4s
frontend-ci / sast (push) Successful in 8s
frontend-ci / fs-scan (push) Successful in 11s
frontend-ci / typecheck (push) Successful in 15s
frontend-ci / lint (push) Successful in 16s
frontend-ci / build (push) Failing after 38s
frontend-ci / push (push) Has been skipped
Mirrors the backend fix. The Gitea runner times out reaching the
GHA artifact cache backend during cache-to export, so drop type=gha
cache-from/cache-to entirely and fold trivy image scan into the
build job to avoid a wasted rebuild.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 11:28:01 -07:00
TehRiehlDeal 9a26b935a8 fix(ci): bump Trivy to v0.70.0 (v0.58.1 was never released)
frontend-ci / lint (push) Successful in 15s
frontend-ci / typecheck (push) Successful in 13s
frontend-ci / secrets-scan (push) Successful in 4s
frontend-ci / sast (push) Successful in 7s
frontend-ci / fs-scan (push) Failing after 11s
frontend-ci / build (push) Has been cancelled
frontend-ci / image-scan (push) Has been cancelled
frontend-ci / push (push) Has been cancelled
The previous pin to v0.58.1 returned a 404 — that tag doesn't exist in
the trivy releases. Latest is v0.70.0; pinning to that. Verified the
asset naming convention (trivy_X.Y.Z_Linux-64bit.tar.gz) is unchanged.
2026-05-08 18:05:58 -07:00
TehRiehlDeal 4e133e71a7 fix(ci): replace flaky trivy-action with direct binary install
frontend-ci / lint (push) Successful in 14s
frontend-ci / typecheck (push) Successful in 13s
frontend-ci / secrets-scan (push) Successful in 4s
frontend-ci / sast (push) Successful in 9s
frontend-ci / fs-scan (push) Failing after 4s
frontend-ci / image-scan (push) Has been cancelled
frontend-ci / push (push) Has been cancelled
frontend-ci / build (push) Has been cancelled
Same pattern as the gitleaks fix: aquasecurity/trivy-action@master does
a nested actions/checkout to fetch its install script, which fails on
the Gitea runner. Switch fs-scan and image-scan to download the trivy
binary release directly and invoke it. Pinned to v0.58.1.
2026-05-08 17:57:14 -07:00
TehRiehlDeal 350e65cbea fix(ci): replace flaky gitleaks-action with direct binary install
frontend-ci / typecheck (push) Successful in 14s
frontend-ci / lint (push) Successful in 14s
frontend-ci / secrets-scan (push) Successful in 4s
frontend-ci / sast (push) Successful in 6s
frontend-ci / fs-scan (push) Failing after 38s
frontend-ci / build (push) Has been cancelled
frontend-ci / image-scan (push) Has been cancelled
frontend-ci / push (push) Has been cancelled
gitleaks/gitleaks-action@v2 has a license-key check that fails on some
Gitea runners. Switch to downloading and running the gitleaks binary
directly — same scan, no action wrapper, no license dependency.
2026-05-08 17:54:31 -07:00
TehRiehlDeal a0d76bc958 feat: runtime config, Gitea Actions pipeline, and Harbor push
frontend-ci / lint (push) Successful in 15s
frontend-ci / typecheck (push) Successful in 14s
frontend-ci / secrets-scan (push) Failing after 4s
frontend-ci / sast (push) Successful in 7s
frontend-ci / fs-scan (push) Failing after 1m27s
frontend-ci / image-scan (push) Has been cancelled
frontend-ci / push (push) Has been cancelled
frontend-ci / build (push) Has been cancelled
Runtime config (src/lib/config.ts, src/api/client.ts, src/lib/ws.ts,
index.html, Dockerfile, nginx.conf, docker/):
- New typed getConfig() helper reads window.__APP_CONFIG__ at runtime
  with import.meta.env.VITE_API_URL as a dev-only fallback.
- index.html loads <script src="/config.js"> synchronously before the
  bundle. /config.js is rendered at container start via envsubst on
  docker/config.js.template, populated from the API_URL env var
  (docker/40-render-config.sh runs as part of the official nginx:alpine
  /docker-entrypoint.d sequence).
- Dockerfile drops the VITE_API_URL build arg — one image works across
  all environments now.
- nginx.conf adds Cache-Control: no-store on /config.js so browsers and
  CDNs don't pin stale config.

Pipeline (.gitea/workflows/ci.yml):
- lint, typecheck, gitleaks, semgrep, Trivy fs+image scans, buildx
  build with gha cache, Harbor push gated on `main` or v* tags
- Image tags via metadata-action: :latest (main only), :sha-<full>,
  semver-derived :1.2.3 / :1.2 / :1 from v* tags
- Secrets: HARBOR_HOST, MOVIELOOP_USERNAME, MOVIELOOP_PASSWORD

Versioning (package.json, .versionrc.json):
- Bumped to 1.0.0 baseline
- Added commit-and-tag-version devDep + release scripts. Conventional
  Commits drive bumps; CHANGELOG hides chore/ci/etc.

Scan configs:
- .gitleaks.toml allows .env.example
- .semgrepignore excludes node_modules/, dist/, coverage/, public/
- .trivyignore placeholder with format docs

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 17:44:33 -07:00