19 Commits

Author SHA1 Message Date
gnezim 184e280b45 Revert "Keep CI helper scripts in synced app"
ci-deploy / build-deploy-test (push) Waiting to run
This reverts commit 1b5cf23400.
2026-05-14 12:08:44 +03:00
gnezim 1b5cf23400 Keep CI helper scripts in synced app 2026-05-14 12:07:05 +03:00
gnezim 3803549a5e release-verify: add diagnostics for 503 errors
ci-deploy / build-deploy-test (push) Successful in 1m11s
- Enhanced wait-for-url.sh to capture HTTP status, response time, and size on failure
- Added full response capture in release-verify.yml for debugging customer URL issues
2026-04-28 17:11:15 +03:00
gnezim e80eeb69e0 deploy-container: wait for SSR readiness before returning from swap
ci-deploy / build-deploy-test (push) Successful in 1m11s
Run 549's wait-for-health logged two HTTP 502s before its third
attempt succeeded — nginx → docker forwarding hit the new container
during the ~4s window between \`docker run -d\` returning and
Node.js inside finishing its boot. The retry loop covered it but the
log was noisy and a slower boot could blow past the 30×2s budget.

Added a post-run readiness probe inside swap: poll
http://127.0.0.1:${PORT}/ on the host (docker container is published
to 127.0.0.1, runner uses host network mode) until it answers 2xx,
up to 30 attempts × 1s. Skipped under --dry-run so the tests/ci/
shell tests still pass without touching the network.

Net effect: wait-for-url against the public URL now succeeds first
attempt, and the run aborts cleanly if the SSR doesn't come up at
all instead of looking healthy because nginx happens to keep a
warmed connection.
2026-04-28 14:44:12 +03:00
gnezim 23f8c82540 ci: send browser User-Agent on every CI probe (WAF UA gate)
ci-deploy / build-deploy-test (push) Failing after 9m54s
Run 544's real cause was deeper than just "WAF rate-limit": the
upstream WAF (flights.test.aeroflot.ru) blocks the default curl UA
unconditionally, returning its HTML "Доступ временно ограничен"
page with HTTP 200. A genuine browser-like User-Agent (tested:
Chrome/120 on Linux) passes through and gets the real JSON.

Confirmed by direct upstream probe via the corp-VPN tunnel:
  curl -A '<default>'  → 3392b text/html (block page)
  curl -A 'Mozilla/5.0 ...' → 28KB+ application/json (real data)

So every prior pre-warm "warmed" the WAF block page into the nginx
cache, and the runner was effectively never reaching the API. The
previous commit's body validation would now catch this — but only
to fail-fast, not to fix it. Real fix: send a browser UA.

Three places updated:

* scripts/ci/wait-for-url.sh — passes -A on every retry.
* ci-deploy.yml diagnose + pre-warm — UA shared via local var.
* release-verify.yml diagnose — same UA on customer-URL probes.

Note: the matching nginx config (proxy_no_cache $no_cache_html +
proxy_cache_bypass $http_cache_control on /api/dictionary/) was
deployed manually to pve-201 and verified — second hits now show
x-cache-status: HIT serving 28KB application/json. HTML responses
no longer get cached.
2026-04-28 12:26:48 +03:00
gnezim 03eeddfbf8 CI/CD pipeline: ssh -L tunnel for TIM API + manual Jenkins trigger
Two design pivots discovered during Phase B prerequisites:

Routing: Replace static-route + NAT plan with persistent ssh -L tunnel
from pve-201 to webzavod (deployment/systemd/flights-tim-tunnel.service).
nginx proxies /api/ and /map/api/ to https://127.0.0.1:8443 with SNI/Host
overrides so cert validation still targets the real hostname. No webzavod
kernel changes (no ip_forward/MASQUERADE), no /etc/hosts pin needed.

Workflow B: Drop Jenkins trigger/poll automation (operator lacks Jenkins
job-configure access and user API token access). release.yml now stops
after MR merge with a Telegram message containing the Jenkins job URL.
release-verify.yml (new, workflow_dispatch only) runs the customer-URL
e2e suite once the operator has triggered Jenkins manually and it has
completed.

Other:
- SSR loopback port 8081 -> 3002 (8081 was taken by openwebui on pve-201)
- notify-telegram.sh skips cleanly when TG secrets unset (was: hard-fail)
- README + spec addendum cover the new prereqs and removed steps
2026-04-27 11:58:39 +03:00
gnezim 0169f00328 ci: stop syncing CLAUDE.md and AGENTS.md to customer repo 2026-04-25 18:40:42 +03:00
gnezim a6293d9d56 ci: surface Jenkins console URL on build-timeout + document GITHUB_TOKEN auto-secret 2026-04-25 03:11:37 +03:00
gnezim 36ad9cac3d ci: audit-console-allowlist.sh — flag dead allowlist entries 2026-04-25 02:50:56 +03:00
gnezim 5dd6190650 ci: factor sync core into scripts/ci/sync-to-gitlab.sh
CI needs to sync to an arbitrary clone dir, not just the local sibling.
Extract the copy logic into sync-to-gitlab.sh (required target arg,
machine-friendly output); reduce sync-to-flights-front.sh to a thin
wrapper that supplies the local default and adds dev next-steps hints.
2026-04-25 02:49:35 +03:00
gnezim 648779bb69 ci: check-gitlab-project.sh — one-shot setup validator 2026-04-25 02:47:36 +03:00
gnezim 0cd8d0c102 ci: jenkins-trigger-and-wait.sh — fire job + poll for SUCCESS 2026-04-25 02:45:24 +03:00
gnezim cb494a4290 ci: deploy-container.sh — swap/rollback with dry-run tests 2026-04-25 02:41:51 +03:00
gnezim f97cb72e9e ci: install-htpasswd.sh — render nginx basic-auth file 2026-04-25 02:39:29 +03:00
gnezim 2727dead6a ci: wait-for-url.sh — curl with retry 2026-04-25 02:37:50 +03:00
gnezim 24358fd3e3 ci: notify-telegram.sh — append last 30 log lines on fail 2026-04-25 02:35:33 +03:00
gnezim 675be1f40f ci: notify-telegram.sh + dry-run tests 2026-04-25 02:33:09 +03:00
gnezim 003054460b Add coverage delta check script
CI / ci (push) Failing after 35s
Deploy / build-and-deploy (push) Failing after 6s
2026-04-15 16:33:01 +03:00
gnezim 1b0f15b082 Add bundle-size gate script for CI 2026-04-15 16:20:55 +03:00