Commit Graph

178 Commits

Author SHA1 Message Date
S
82b6a9de95 fix: update Docker Compose template to include Gitea network name variable 2026-03-02 10:39:31 -05:00
S
5582656be0 fix: update Caddy Docker Compose template to use variable for Gitea network name 2026-03-02 10:39:20 -05:00
S
d5edc4d49b fix: update Docker network variable usage for consistency in Fedora deployment script 2026-03-02 10:38:54 -05:00
S
59e3e8e06a fix: streamline Docker network verification and enhance error handling in Unraid setup 2026-03-02 10:38:48 -05:00
S
6882a6cd7a fix: enhance Gitea teardown script with error handling and safety checks 2026-03-02 09:29:32 -05:00
S
d307361810 fix: update organization existence check and enhance Gitea Actions API accessibility verification 2026-03-02 09:29:28 -05:00
S
1ac02ad10d fix: ensure data directories exist before creating them in Unraid setup 2026-03-02 09:29:22 -05:00
S
c5190020de fix: load environment variables early for runners.conf validation 2026-03-02 09:21:45 -05:00
S
4954e04825 fix: enhance repo validation to support comma-separated lists and expand multi-repo runners 2026-03-02 09:16:07 -05:00
S
37e855b210 fix: update usage guide to clarify network setup and add runner scoping instructions 2026-03-02 09:16:03 -05:00
S
ccca97a4b3 fix: update requirements in README for passwordless sudo on Unraid and Fedora 2026-03-02 09:15:58 -05:00
S
31e8553752 fix: update preflight checks for runners.conf and DNS validation 2026-03-02 09:15:52 -05:00
S
7bf3a1bfd5 fix: add validation for comma-separated repos in registration token resolution 2026-03-02 09:15:47 -05:00
S
b22a95522b fix: update runners.conf.example to clarify repo token fetching for multiple repositories 2026-03-02 09:15:43 -05:00
S
4919293a6e fix: add functions to copy and remove INI sections in common.sh 2026-03-02 09:15:36 -05:00
S
fe5023b3ee fix: add python3 verification for preflight DNS checks in macbook setup script 2026-03-02 09:15:20 -05:00
S
22bf55010b fix: update usage guide to include instructions for enabling passwordless sudo on remote hosts 2026-03-02 08:53:23 -05:00
S
e8e2c845d9 fix: add validation for runner host and type combinations in configuration wizard 2026-03-02 08:52:33 -05:00
S
9afd4ee537 fix: enhance prompt_var function to support optional_path validation for SSH key inputs 2026-03-02 08:52:29 -05:00
S
de48dad967 fix: enhance .env loading to safely parse key-value pairs and handle special characters 2026-03-02 08:52:25 -05:00
S
97220181d8 fix: add host/type compatibility checks in runners.ini format validation 2026-03-02 08:52:21 -05:00
S
c5f9bb506f fix: validate runner host and type combinations in parse_runner_entry function 2026-03-02 08:51:43 -05:00
S
f82c98513f fix: update SSH key description for clarity in .env.example 2026-03-02 08:51:38 -05:00
S
4a90e8eaab fix: update Docker installation command for DNF5 compatibility in fedora.sh 2026-03-02 08:51:32 -05:00
S
0d1593027a fix: update default data_path description and increase default capacity in runners.conf.example 2026-03-02 08:13:30 -05:00
S
3d39a9ef07 fix: remove redundant environment variable entries in common.sh 2026-03-02 08:13:25 -05:00
S
4135f9d5c0 fix: update total prompt count in configure_env.sh to reflect changes in fixed prompts 2026-03-02 08:12:35 -05:00
S
5c60d321ab fix: update .env loading comments and adjust default path handling for runners 2026-03-02 08:12:31 -05:00
S
2a993b07df fix: update interactive .env wizard prompt count in configure_env.sh 2026-03-02 08:12:26 -05:00
S
c5e3f43806 fix: update capacity validation to default to 1 if empty in preflight checks 2026-03-02 08:12:21 -05:00
S
b2cf192707 fix: update parameter descriptions and prompt counts in implementation plan 2026-03-02 08:12:16 -05:00
S
29d9523f44 fix: remove docker-compose.yml after stopping Docker runner to enhance security 2026-03-02 08:12:10 -05:00
S
b2520bec0e fix: remove unused runner data path variables from .env.example 2026-03-02 08:12:04 -05:00
S
13f73b850f docs: fix stale references in PLAN, contracts, README
- README.md: update prompt count ~65 to ~70
- contracts/gitea-api.md: fix "Used in" annotations — POST
  branch_protections is Phase 7 only (not Phase 9), DELETE
  branch_protections is Phase 7 teardown only (Phase 9 uses PATCH),
  add missing used-in entries for GET commits and GET contents
- PLAN.md: replace stale UNRAID_GITEA_PORT/FEDORA_GITEA_PORT with
  macvlan vars, update REPO_N_NAME to REPO_NAMES, fix version defaults
  (1.23->1.25, 0.2.11->0.3.0), add missing setup/ files to tree,
  fix prompt table to match current ~70 variables, update require_vars
  lists to match actual scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 13:21:40 -05:00
S
9494645b3a fix: resolve 10 bugs across scripts
- manage_runner.sh: fix RUNNER_DEFAULT_IMAGE clobbering by renaming
  per-runner var to RUNNER_SECTION_IMAGE; .env fallback now works
- manage_runner.sh: render native runner config.yaml before registration
  so act_runner can read it during --config flag
- manage_runner.sh: add SSH credential validation for remote hosts
  (fail early with clear error instead of cryptic SSH failure)
- phase1/phase2: add UNRAID_DB_IP/FEDORA_DB_IP to conditional
  require_vars when DB_TYPE != sqlite3
- cleanup.sh: only clear manifest when all actions for host succeeded;
  failed actions are preserved for retry
- phase8_cutover.sh: strip empty environment: block from Caddy
  docker-compose when TLS_MODE=existing
- phase5_migrate_pipelines.sh, phase5_teardown.sh, phase9_teardown.sh:
  wrap cd+git in subshells so working directory is always restored
- phase3_post_check.sh: handle both string and numeric runner status
  from Gitea API (offline vs 2)
- configure_env.sh: fix TOTAL_PROMPTS base count (63->64) and move
  DB/repo count adjustments before their prompts are shown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 13:21:30 -05:00
S
045283be50 docs: fix stale references across all documentation
README.md: add missing configure_runners.sh, fix check count 22→24
USAGE_GUIDE.md: fix check refs 23-24→21-22, add CAP column to
  manage_runner list example
PLAN.md: fix mirror-sync→push_mirrors-sync endpoint
contracts/gitea-api.md: add 5 missing endpoints (DELETE tokens,
  repo-scoped runner registration, PUT/POST GitHub Pages, GitHub
  commits), remove unused actions/workflows endpoint, fix
  GET /settings/api Used-in to include Phase 2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:55:23 -05:00
S
6f97f5f08f fix: add MIGRATION_POLL vars to validation arrays and wizard
MIGRATION_POLL_INTERVAL_SEC and MIGRATION_POLL_TIMEOUT_SEC were in
.env.example and used by phase4, but missing from validate_env()
arrays and configure_env.sh prompts. Preflight would not catch
invalid values. Now validated as positive_integer and prompted
in the REPOSITORIES section of the wizard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:55:16 -05:00
S
01f11df417 fix: wire CADDY_DOMAIN into Caddyfile template for wildcard cert
CADDY_DOMAIN was required/validated/prompted but never used — the
Caddyfile only referenced GITEA_DOMAIN, producing a single-domain
cert. Now the template uses *.CADDY_DOMAIN as the site address
(wildcard cert) with a host matcher routing GITEA_DOMAIN to Gitea.
This means the cert covers all subdomains under the base domain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:18:53 -05:00
S
61b46eb876 fix: handle per-repo failures in phase9 instead of aborting
Previously, a failure on any repo (clone, commit, push) would kill the
entire script via set -e. Remaining repos were never processed and the
FAILED counter was always 0. Now clone and commit/push failures
increment FAILED and continue to the next repo, matching the pattern
used in phase4_migrate_repos.sh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:15:16 -05:00
S
95eeb698da docs: fix stale counts and preflight check numbering
README.md: 10 templates→9, ~6500 lines→~8000, 25 checks→22, ~50 prompts→~65
CLAUDE.md: ~55 env vars→~70
PLAN.md: mark all tracker items DONE, fix Nginx→Caddy/SSL→TLS refs,
  add missing setup scripts and template entries
USAGE_GUIDE.md: add configure_runners.sh mention, fix check 15→14 ref
preflight.sh: renumber checks to fill gaps at 14 and 19 (now 1-22)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:59:35 -05:00
S
663376e1cc chore: remove 4 dead functions from lib/common.sh
get_repo_list() — never called, scripts use read -ra directly
wait_for_ssh() — never called, scripts use ssh_check
validate_optional() — never called, optional type unused in arrays
manifest_exists() — never called

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:59:25 -05:00
S
8cf762c465 refactor: extract set_db_vars and strip_template_block to lib/common.sh
Identical copies of _set_db_vars() and _strip_block() existed in
phase1, phase2, and phase8. Moved to lib/common.sh as set_db_vars()
and strip_template_block() (public API, no underscore prefix).
Removed dead _strip_block definition from phase8 (defined but never called).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:39:20 -05:00
S
b573b77ab1 fix: remove unused FEDORA_CADDY_IP from validation and wizard
No phase script deploys Caddy on Fedora — only Unraid gets a Caddy
container. Removed from .env.example, validation arrays, preflight
required vars, IP ping check, wizard prompts, and doc references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:39:15 -05:00
S
33f9845dd6 fix: remove unnecessary GITEA_ADMIN_PASSWORD from phase5 require_vars
Phase 5 authenticates via GITEA_ADMIN_TOKEN only (git_with_auth uses
the token, not the password). Phase 9 already correctly omits it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:39:10 -05:00
S
08b2a9f5e4 fix: add conditional require_vars for DB credentials in restore script
restore_to_primary.sh uses GITEA_DB_USER, GITEA_DB_PASSWD, and
GITEA_DB_NAME for external DB restore but never required them upfront.
Adds conditional require_vars when GITEA_DB_TYPE != sqlite3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:39:05 -05:00
S
f916f12b90 docs: update gitea-api.md — remove hardcoded 3-repo pagination assumption
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:08:33 -05:00
S
e737128028 docs: update USAGE_GUIDE.md — Nginx→Caddy, ports→IPs, dynamic repos
- Prerequisites: Nginx container→Cloudflare API token, ports→macvlan IPs
- Edge cases: replaced Nginx/Certbot troubleshooting with Caddy/TLS_MODE
- Rollback: Nginx config removal→Caddy container/config removal
- Day-to-day: replaced certbot renewal with Caddy auto-renewal
- Adding repos: REPO_4_NAME→append to REPO_NAMES

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:08:10 -05:00
S
4ec30ca3e6 docs: update PLAN.md — Nginx→Caddy, SSL_MODE→TLS_MODE, port→IP checks
- Added note that plan describes original architecture with diffs noted
- Architecture table: Nginx+Certbot→Caddy+Cloudflare DNS-01
- File structure: nginx-gitea.conf.tpl→Caddyfile.tpl + caddy compose
- Variable table: NGINX_*/SSL_MODE/SSL_EMAIL→TLS_MODE/CADDY_*/CLOUDFLARE_*
- Preflight checks: port checks→container IP availability, Nginx→Caddy path
- Phase 8: complete rewrite from 10-step Nginx flow to 6-step Caddy flow
- Template section: replaced nginx template spec with Caddy template spec
- Removed stale port variables from "Not checked" list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:06:53 -05:00
S
f87acc5664 docs: update README.md — Nginx→Caddy, dynamic repos, macvlan networking
- Architecture diagram: Gitea+Nginx→Gitea+Caddy, Let's Encrypt→macvlan
- Phase 8 description: Nginx→Caddy with Cloudflare DNS-01
- Template listing: nginx-gitea.conf.tpl→Caddyfile.tpl + caddy compose
- Design rationale: replaced "Why Nginx" with "Why Caddy"
- Compromises: replaced SSL cron section with Caddy auto-renewal
- Prerequisites: removed "existing Nginx container", added Cloudflare
- Removed hardcoded "3 repos" references throughout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:04:11 -05:00
S
89bfc8a70f docs: update CLAUDE.md — Nginx→Caddy, 3 repos→dynamic, ssl_mode→tls_mode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:02:29 -05:00