# .woodpecker/edge-subpath.yml — Edge subpath routing smoke test # # Runs end-to-end smoke tests for Forgejo, Woodpecker, and chat subpath routing: # - Forgejo at /forge/ # - Woodpecker at /ci/ # - Chat at /chat/ # - Staging at /staging/ # # Tests: # 1. Root / redirects to /forge/ # 2. Forgejo login at /forge/ completes without redirect loops # 3. Forgejo OAuth callback for Woodpecker succeeds under subpath # 4. Woodpecker dashboard loads all assets at /ci/ (no 404s on JS/CSS) # 5. Chat OAuth login flow works at /chat/login # 6. Forward_auth on /chat/* rejects unauthenticated requests with 401 # 7. Staging content loads at /staging/ # # Triggers: # - Pull requests that modify edge-related files # - Manual trigger for on-demand testing # # Environment variables (set in CI or via pipeline): # EDGE_BASE_URL — Edge proxy URL (default: http://localhost) # EDGE_TIMEOUT — Request timeout in seconds (default: 30) # EDGE_MAX_RETRIES — Max retries per request (default: 3) # # When to run: # - Any change to edge.hcl, docker/edge/, tools/edge-control/ # - Any change to this pipeline file # - Manual trigger for testing edge deployments when: event: [pull_request, manual] path: - "nomad/jobs/edge.hcl" - "docker/edge/**" - "tools/edge-control/**" - ".woodpecker/edge-subpath.yml" - "tests/smoke-edge-subpath.sh" clone: git: image: alpine/git commands: - AUTH_URL=$(printf '%s' "$CI_REPO_CLONE_URL" | sed "s|://|://token:$FORGE_TOKEN@|") - git clone --depth 1 "$AUTH_URL" . - git fetch --depth 1 origin "$CI_COMMIT_REF" - git checkout FETCH_HEAD steps: - name: edge-subpath-smoke-test image: alpine:3.19 commands: - apk add --no-cache bash curl jq - bash tests/smoke-edge-subpath.sh