Commit Graph

14 Commits

Author SHA1 Message Date
S
57ceae3bd5 fix: add symlink registration for Unraid Compose Manager dashboard 2026-03-02 11:06:24 -05:00
S
23e93c5124 fix: run Gitea admin user creation command as 'git' user in Unraid 2026-03-02 11:05:19 -05:00
S
c30acc5bbf fix: remove GITEA_INTERNAL_URL from required variables in phase1_gitea_unraid.sh 2026-03-02 10:51:04 -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
1ac02ad10d fix: ensure data directories exist before creating them in Unraid setup 2026-03-02 09:29:22 -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
64e7fd1bff feat: switch phase1 to macvlan networking
Replace host port vars with macvlan vars in require_vars. Add Step 2
to create the macvlan gitea_net network on Unraid. Update
docker-compose rendering to use GITEA_CONTAINER_IP and
DB_CONTAINER_IP instead of port mapping. Renumber steps accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:23:17 -05:00
S
2c900b7e4f feat: add database support to phase1_gitea_unraid.sh
Add _set_db_vars() helper to configure DB-specific docker-compose
vars (image, env, healthcheck, data dir) for postgres/mysql/mssql.
Add _strip_block() to remove conditional template markers. Update
docker-compose and app.ini rendering to strip/populate DB blocks
based on GITEA_DB_TYPE. Conditionally require DB connection vars.
Create DB data directory for external databases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:17:37 -05:00
S
83f706c6b8 feat: add idempotent token deletion before generating new Gitea admin token 2026-03-01 08:58:34 -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
63f708e556 feat: add Phase 1 — Gitea on Unraid
- phase1_gitea_unraid.sh: 9-step deploy (dirs, docker-compose, app.ini,
  container start, wait, admin user, API token, save to .env, create org).
  Every step has idempotency check — running twice changes nothing.
- phase1_post_check.sh: 5 independent verification checks
- phase1_teardown.sh: stop container + optionally remove data, with prompts

Also adds inline comments to lib/common.sh and preflight.sh explaining
WHY decisions were made (SSH flags, API tmpfile pattern, port checks, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:12:02 -06:00