fix: use internal k8s service URL for CI clone #215
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-api!215
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-ci-tls-clone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
http://forgejo-http.forgejo.svc.cluster.local:80/, matching the pattern from pal-e-platform PR #134forgejo_tokenWoodpecker secret event filter to includepull_requestso clone works on PR pipelinesChanges
.woodpecker.yaml-- Addedclone:block withalpine/gitimage,.netrcauth viaforgejo_tokensecret, and internal k8s service URL for git operationsforgejo_token-- Updated event filter from[push]to[push, pull_request]Test Plan
Review Checklist
Related
Review: Approved
Diff: 1 file, +15 lines. Clone block is an exact match to the proven pattern in pal-e-platform
.woodpecker.yaml.Correctness: Uses internal k8s service URL (
http://forgejo-http.forgejo.svc.cluster.local:80/),.netrcauth withforgejo_tokensecret, shallow depth-1 fetch. This is the same fix that resolved TLS clone failures in pal-e-platform (PR #134).Secrets: No secrets committed. Token referenced via
from_secret.Out-of-diff change: The
forgejo_tokenWoodpecker secret event filter was updated from[push]to[push, pull_request]so PR pipelines can also authenticate during clone.Scope: Clean. No unrelated changes.
No findings. Ready for merge.
PR #215 Review
DOMAIN REVIEW
Tech stack: Woodpecker CI pipeline YAML (k8s-native CI, Forgejo-hosted).
This PR adds a custom
clone:block to.woodpecker.yamlto bypass the default Woodpecker clone behavior, which uses the external HTTPS/Tailscale URL and fails with TLS errors inside the cluster.Clone block analysis:
pal-e-platform/.woodpecker.yaml(PR #134). This is the correct approach -- reuse the exact pattern that fixed the same problem in the bootstrap repo.alpine/gitimage -- lightweight, correct for git-only work..netrcauth viafrom_secret: forgejo_token-- no credentials in code..netrcpermissions set to 600 -- correct.http://forgejo-http.forgejo.svc.cluster.local:80/${CI_REPO}.git-- internal k8s service, HTTP (not HTTPS), avoids the TLS/Tailscale hairpin issue entirely.sleep 2before clone -- matches the platform pattern, gives the container network time to settle.--depth 1) with${CI_COMMIT_SHA}-- efficient and deterministic.No external HTTPS URLs remain anywhere in the file. All Forgejo references use the internal k8s service URL.
Existing pipeline steps are completely untouched: test, migration-test, build-and-push, and smoke-test are unchanged (0 deletions, 15 additions).
Secret event filter: The PR body mentions updating the
forgejo_tokenWoodpecker secret event filter to includepull_request. This is an out-of-band change (Woodpecker admin UI), not a file change. The pipeline'swhen:block already includesevent: pull_request(line 19), so the secret must be available for PR events for the clone to succeed. This PR's own pipeline run will validate that the secret change was applied.BLOCKERS
None.
NITS
DRY observation (non-blocking): The clone block is now duplicated across pal-e-platform and pal-e-docs. This is the correct approach for now -- Woodpecker does not support shared pipeline fragments, and each repo needs its own
.woodpecker.yaml. Worth noting for future consideration if Woodpecker adds pipeline includes.Hardcoded username
forgejo_adminin.netrc: Both repos hardcode the Forgejo admin username. Non-blocking since this matches the established pattern and the username is not a secret, but if the admin username ever changes, every repo's clone block would need updating.SOP COMPLIANCE
fix-ci-tls-clone, issue is #214. Convention expects branch named after issue number (e.g.,214-fix-ci-tls-clone). Minor deviation, but this is a hotfix for a platform blocker, so pragmatism applies.from_secret:references. The only plaintext passwords are the pre-existingpostgres/postgrestest DB credentials in the CI service container.PROCESS OBSERVATIONS
VERDICT: APPROVED
Clean, surgical fix that reuses the exact proven pattern from pal-e-platform. No secrets, no scope creep, no regressions possible (0 deletions). The PR's own pipeline run is the definitive validation. Ship it to unblock pal-e-docs CI.