Commit Graph

16 Commits

Author SHA1 Message Date
S
9e5ce55bb7 fix: ensure data directories on Fedora are created only if necessary 2026-03-02 13:09:58 -05:00
S
ab1d781ccc fix: remove GITEA_DB_HOST and related references from Fedora deployment script 2026-03-02 12:04:17 -05:00
S
5ba53e11a3 fix: include FEDORA_COMPOSE_DIR in variable requirements and update paths in phase2_gitea_fedora.sh 2026-03-02 11:43:00 -05:00
S
bcbbdb7364 fix: run Gitea admin user creation command as 'git' user in Fedora script 2026-03-02 11:05:25 -05:00
S
844fa948c3 fix: remove GITEA_BACKUP_INTERNAL_URL from required variables in phase2_gitea_fedora.sh 2026-03-02 10:51:09 -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
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
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
d2e5a62510 fix: resolve shellcheck warnings (SC2168, SC2089, SC2090, SC2016, SC2329)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:39:38 -05:00
S
d202f75d87 feat: switch phase2 to macvlan networking
Replace host port vars with macvlan vars in require_vars. Add Step 2
to create macvlan gitea_net network on Fedora. Update docker-compose
rendering to use GITEA_CONTAINER_IP and DB_CONTAINER_IP. Use
FEDORA_GITEA_IP as domain for backup instance app.ini. Renumber steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:24:25 -05:00
S
b4b0d1b056 feat: add database support to phase2_gitea_fedora.sh
Mirror phase1 DB support: add _set_db_vars() and _strip_block()
helpers, conditional require_vars for DB connection, DB data directory
creation, and conditional template rendering for docker-compose and
app.ini based on GITEA_DB_TYPE.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:18:27 -05:00
S
017ab098f1 fix: remove GITEA_INSTANCE_NAME from phase2 require_vars
Phase 2 (backup instance) does not use GITEA_INSTANCE_NAME.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:02:01 -05:00
S
24d7df0a0b feat: add idempotent token deletion before generating new Gitea backup admin token 2026-03-01 08:58:39 -05:00
S
743f1281e6 chore: fix shellcheck findings across migration scripts 2026-02-28 21:39:23 -05:00
S
dc08375ad0 fix: address multiple bugs from code review
- teardown_all.sh: replace `yes |` pipeline with `< <(yes)` process
  substitution to avoid SIGPIPE (exit 141) false failures under pipefail
- phase6_teardown.sh: extract push mirror `.id` instead of `.remote_name`
  to match the DELETE /push_mirrors/{id} API contract
- phase5_migrate_pipelines.sh: expand sed regex from `[a-z_]*` to
  `[a-z_.]*` to handle nested GitHub contexts like
  `github.event.pull_request.number`
- lib/common.sh: render_template now requires explicit variable list to
  prevent envsubst from eating Nginx variables ($host, $proxy_add_...)
- backup scripts: remove MacBook relay, use direct Unraid↔Fedora SCP;
  fix dump path to write to /data/ (mounted volume) instead of /tmp/
  (container-only); add unzip -t integrity verification
- preflight.sh: add --skip-port-checks flag for resuming with
  --start-from (ports already bound by earlier phases)
- run_all.sh: update run_step to pass extra args; use --skip-port-checks
  when --start-from > 1
- post-checks (phase4/7/9): wrap API calls in helper functions with
  >/dev/null redirection instead of passing -o /dev/null as API data
- phase8: replace GitHub archiving with [MIRROR] description marking
  and disable wiki/projects/Pages (archived repos reject push mirrors)
- restore_to_primary.sh: add require_vars for Fedora SSH variables

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 20:18:35 -05:00
S
eaffb97144 feat: add Phase 2 — Gitea on Fedora (backup instance)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:16:32 -06:00