Commit Graph

79 Commits

Author SHA1 Message Date
jmiller 764451d003 fix: add updates.xml sync-to-main step for non-main branches [skip ci] 2026-04-23 19:31:17 +00:00
jmiller 4c9bb73765 ci: remove DEV_FTP_SUFFIX — path is now set per repo as full absolute path 2026-04-23 19:18:59 +00:00
jmiller 57539c7592 feat: support separate SSH hosts for dev/live deploys
DEPLOY_SSH_HOST for dev, LIVE_SSH_HOST for live (falls back to DEPLOY_SSH_HOST)
2026-04-23 19:11:24 +00:00
jmiller e7ac5f2c0b fix: support bare dev branch + push triggers in update-server [skip ci] 2026-04-23 18:03:36 +00:00
jmiller 2f4420ce8b docs: document cascade release channels and dev-release workflow [skip ci] 2026-04-23 17:41:18 +00:00
jmiller 1311cacd2c chore: add joomla-api-mcp sync definition 2026-04-23 17:36:03 +00:00
jmiller 6fce7e6569 docs: add deploy.yml.template to Joomla workflow index 2026-04-23 17:29:01 +00:00
jmiller 7f5aa2f7f4 feat: add SSH rsync auto-deploy workflow template for client repos 2026-04-23 17:28:33 +00:00
Jonathan Miller 4d5d7edee5 feat: auto-push main to GitHub mirror after release (Step 10)
Ensures updates.xml on GitHub stays in sync with Gitea.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 07:23:53 -05:00
Jonathan Miller 94da1e3a51 fix: remove tar.gz from updates.xml in update-server template
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 02:17:31 -05:00
Jonathan Miller f850377f99 fix: remove tar.gz from updates.xml — Joomla may download it instead of ZIP, causing SHA mismatch
tar.gz is still built and uploaded as release asset for manual download,
but only ZIP appears in updates.xml with matching SHA-256.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 02:04:23 -05:00
Jonathan Miller e40de18dbb fix: switch back to direct API file update for updates.xml sync
PR-based sync fails with branch protection requiring reviews.
Direct API update bypasses protection for bot commits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 21:30:38 -05:00
Jonathan Miller c244790e44 fix: PR sync always runs, cleans up stale branches first
Removed conditional on CURRENT_BRANCH — workflow may be on version/XX
after archiving. Deletes stale PR branch before creating fresh one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 04:29:26 -05:00
Jonathan Miller 327ffc7032 feat: release workflows run on dedicated 'release' runner
Updated auto-release and update-server templates + docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 04:14:16 -05:00
jmiller d736df870a docs: add client repository standards documentation
Covers naming conventions, directory structure, privacy rules,
workflow profile, update server priority, deployment methods,
and differences from standard Joomla repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 09:01:56 +00:00
jmiller 3e15d4d3b0 chore: remove job timeout from bulk-repo-sync (no rate limit on Gitea)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 08:52:35 +00:00
Jonathan Miller 87ba8bc1c7 fix: install PHP+Composer if missing (works on any runner image)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 03:52:25 -05:00
jmiller 8c3eb17922 fix: remove duplicate mangled enforce-tags step from workflow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 08:50:45 +00:00
jmiller c78cd167ea fix: repair mangled YAML in bulk-repo-sync tag enforcement step
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 08:46:59 +00:00
jmiller 14c4408e8d docs: codify Gitea-first update server priority policy
- docs/workflows/update-server.md: added Update Server Priority section
  explaining why Gitea must be priority 1 (source of truth, self-hosted,
  GitHub mirrors may lag)
- templates: updated CLAUDE.md and copilot-instructions templates for
  Joomla extensions with the priority rule

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 08:37:05 +00:00
jmiller ae0d233b93 feat: add tag enforcement to bulk-repo-sync
automation/enforce_tags.sh ensures all repos have the 5 standard
release channel tags (development, alpha, beta, release-candidate,
stable) and removes non-standard tags. Runs as part of the monthly
bulk sync and can be called standalone.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 08:29:03 +00:00
Jonathan Miller c3e989d150 feat: sync updates.xml to main via PR (respects branch protection)
Creates chore/update-xml-<version> branch, updates file, creates PR,
auto-merges, cleans up branch. Replaces direct API file push.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 03:16:21 -05:00
Jonathan Miller d146b5d51e fix: derive element from XML filename, not display name
Plugins like MokoWaaS have display name "System - MokoWaaS" but
element should be "mokowaas" (from mokowaas.xml filename).
Falls back to repo name for generic filenames like templateDetails.xml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 02:45:31 -05:00
Jonathan Miller 4cf967f92b fix: stream-based tags (stable not vXX), derive element from repo name
- release_tag=stable instead of v${MAJOR}
- download URLs use /stable/ path
- Element fallback uses repo name not display name
- Updated channel-to-workflow docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 02:19:03 -05:00
Jonathan Miller 4d99ab9a4e fix: git push -u origin HEAD for version branch (no upstream)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 21:33:11 -05:00
Jonathan Miller 617344c4d7 fix: GH_MIRROR_TOKEN → GH_TOKEN in all templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 21:12:12 -05:00
Jonathan Miller b57de90cef fix: add VERSION header to updates.xml in all workflow templates
Auto-release and update-server now write the copyright + VERSION
comment header when generating/rebuilding updates.xml.
Updated updates.xml.template scaffold to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 21:09:04 -05:00
Jonathan Miller dbd7ec8ae6 fix: hardcode MokoStandards-API branch to main (remove {{standards_branch}} placeholder)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 21:03:21 -05:00
Jonathan Miller f30c0dc9f9 docs: update multi-channel architecture — cascading channel updates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 16:50:10 -05:00
Jonathan Miller dcd22dcfdc feat: cascading update channels — stable updates all, rc updates rc+below, etc
Channels cascade downward:
- stable → development, alpha, beta, rc, stable
- rc → development, alpha, beta, rc
- beta → development, alpha, beta
- alpha → development, alpha
- development → development

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 16:49:33 -05:00
Jonathan Miller adcbd2d2f4 chore: add .claude-worktree*/ to all gitignore templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 14:20:56 -05:00
Jonathan Miller 14b4477ff2 docs: document auto-bump on all branches in multi-channel architecture
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 12:30:21 -05:00
Jonathan Miller 032c32637f feat: auto-bump patch on all branches including dev
Previously dev branches were excluded from auto-bump. Now all
stability branches (dev, alpha, beta, rc) bump patch automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 12:26:57 -05:00
Jonathan Miller 16a86a94b7 docs: add multi-channel updates.xml architecture, update Joomla template listings
- Add Multi-Channel updates.xml Architecture section to README.md
- Document auto-release.yml.template and update-server.yml.template
- Update joomla/index.md with current template inventory

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 12:17:46 -05:00
Jonathan Miller b68a23622a fix: remove patch 00 skip in auto-release template, all patches release
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 12:11:31 -05:00
Jonathan Miller 005ae12598 feat: MySQL export reads from config files, hardcode jmiller permissions
export-mysql.yml.template:
- Reads MySQL credentials from remote config files automatically:
  - Joomla: configuration.php ($user, $password, $db)
  - Dolibarr: conf/conf.php ($dolibarr_main_db_*)
- No MySQL secrets needed — credentials come from the app config
- Auto-detects platform (Joomla vs Dolibarr)
- Removed DEV_MYSQL_PASSWORD/DEMO_MYSQL_PASSWORD secret requirements

Permission hardcoding:
- Added ALLOWED_USERS="jmiller gitea-actions[bot]" to:
  deploy-demo, deploy-dev, deploy-rs, branch-freeze templates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 17:18:48 -05:00
Jonathan Miller 3834781899 feat: add pull-from-dev and export-mysql workflow templates
pull-from-dev.yml.template:
- Downloads files from dev server via rsync/SSH into repo src/
- Configurable via DEV_SSH_HOST, DEV_SSH_USERNAME, DEV_PULL_PATH vars
- Auth via DEV_SSH_KEY secret
- Dry-run mode, branch selection, diff preview

export-mysql.yml.template:
- Exports MySQL database from dev or demo server
- Supports both Joomla and Dolibarr environments
- Sanitizes PII: passwords (bcrypt), emails, sessions, API keys, tokens
- Preserves admin/moko emails, strips everything else
- Dolibarr-specific: clears api_key, pass_crypted, ldap_pass, oauth secrets
- Saves as artifact (30d retention) or commits to sql/exports/
- Configurable per environment (dev/demo) via org or repo variables

Required variables (org or repo):
- DEV_SSH_HOST, DEV_SSH_PORT, DEV_SSH_USERNAME
- DEV_MYSQL_DATABASE, DEV_MYSQL_USER
- Secrets: DEV_SSH_KEY, DEV_MYSQL_PASSWORD

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 15:02:01 -05:00
Jonathan Miller c00a04087f Fix: protected files skip entirely before stale token check
Protected files (like updates.xml) were being overwritten because
the stale-token check ran AFTER the canOverwrite gate. Now protected
files continue (skip) immediately, even with --force.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 14:10:14 -05:00
Jonathan Miller 2b9bfb032e Protect updates.xml from bulk sync overwrite
Set protected=true, remove template reference. updates.xml is managed
by the release workflow, not bulk sync — sync was replacing it with
a stub template containing {{EXTENSION_NAME}} placeholders.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 13:07:35 -05:00
Jonathan Miller b9109c51bc docs: update release cycle — Gitea-only pre-release, dual stable downloads
- Added platform distribution table (stable=dual, pre-release=Gitea only)
- Updated all example URLs from GitHub to Gitea
- Stable gets dual <downloadurl> (Gitea + GitHub)
- RC/Beta/Alpha/Dev get single <downloadurl> (Gitea only)
- Updated targetplatform to [56].*
- Updated Dolibarr update.txt URL to Gitea
- Removed sha256/client fields from examples (not used)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 13:04:32 -05:00
Jonathan Miller 0f9f110c2d Gitea-primary: update definitions, sync lib, token guidance
- waas-component.tf: 27 lines — GitHub URLs→Gitea, GA_TOKEN guidance,
  gitea-actions[bot], jmiller username
- joomla-template.tf: same pattern
- RepositorySynchronizer.php: jmiller-moko→jmiller

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 12:45:23 -05:00
Jonathan Miller 4cf931e7a3 fix: align updates.xml template with MokoCassiopeia format
- Removed copyright/FILE INFORMATION header (not needed in synced XML)
- Hardcoded org names: MokoConsulting (Gitea), mokoconsulting-tech (GitHub)
- Download URLs formatted with line breaks matching MokoCassiopeia
- Target platform: [56].* (matches Joomla 5.x and 6.x)
- PHP minimum: 8.1 (matching live repos)
- Removed {{GITEA_ORG}}/{{GITHUB_ORG}} tokens — orgs are fixed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 01:01:26 -05:00
Jonathan Miller a7f758f888 fix: remove self-require and fix script paths in composer.json
- Removed mokoconsulting-tech/enterprise self-reference from require
  (package cannot require itself)
- Fixed phpcs/phpstan script paths: api/ → lib/ validate/ automation/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 00:55:26 -05:00
Jonathan Miller 7b863f690d fix: remove all stale api/ path references across PHP codebase
Updated ~60 files: comments, usage docs, SCRIPT_PATH constants,
wrapper paths, require paths, error messages, and help text.
All api/validate/ → validate/, api/automation/ → automation/, etc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 19:18:22 -05:00
Jonathan Miller bd53fe834f feat: add gitignore validation, move bulk-repo-sync workflow here
- Add REQUIRED_GITIGNORE_ENTRIES constant with mandatory patterns:
  Sublime project/workspace, sftp-config, IDE dirs, secrets, vendor, logs
- Add validateGitignoreEntries() method for checking required entries
- mergeGitConfigFile() still appends missing entries (non-destructive)
- Add .gitea/workflows/bulk-repo-sync.yml (moved from MokoStandards)
  - Runs from this repo directly (checkout self, not remote)
  - Org updated to MokoConsulting (Gitea)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 18:17:24 -05:00
Jonathan Miller 784f423973 Fix remaining --jq, --paginate, --input flags in workflow templates
branch-freeze, repository-cleanup, manage-repo-templates converted
from gh CLI flags to curl/jq equivalents.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 17:03:33 -05:00
Jonathan Miller 4742dfcbec fix: rename update.xml → updates.xml across all definitions and templates
Standardizes the Joomla update server filename to `updates.xml` (plural)
across all .tf definitions, workflow templates, and automation scripts.
The singular `update.xml` was inconsistent with the Joomla convention
and the updates.xml.template already in use.

Files fixed: 16 (definitions, templates, automation scripts)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:39:21 -05:00
Jonathan Miller 5dff3346f0 Fix auto-release template: use Gitea API for main sync, auth push URL
- Replace git push to main with Gitea contents API (bypasses branch protection)
- Add authenticated push URL step after checkout
- Matches MokoCassiopeia release.yml pattern

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 12:53:23 -05:00
Jonathan Miller 029033c2f6 Fix: set authenticated push URL in auto-release template for branch protection 2026-04-18 12:34:43 -05:00
Jonathan Miller 700e0abaac Fix: auto-release pushes updates.xml to main for update server
When releasing from a non-main branch, updates.xml is cherry-picked
to main so the Joomla update server always serves current data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 12:02:21 -05:00