Files
MokoCLI/definitions/default/platform.tf
T
Jonathan Miller 34ef05bd6e
Generic: Repo Health / Site Health (push) Has been cancelled
Universal: Cascade Main → Dev / Cascade main → branches (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Platform: moko-platform CI / Gate 1: Code Quality (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
refactor: fix definition drift — migrate to .mokogitea, rename templates/gitea → templates/mokogitea
- Replace all .github/workflows refs in definitions with .mokogitea/workflows
- Add all 13 universal workflows to every platform definition
- Fix ISSUE_TEMPLATE paths: .github/ → .mokogitea/
- Fix template source paths: templates/github/ → templates/mokogitea/
- Remove 60+ dead template references pointing to non-existent files
- Rename templates/gitea/ directory to templates/mokogitea/
- Add orphaned workflows (ci-platform, issue-branch) to definitions

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 23:21:42 -05:00

343 lines
14 KiB
Terraform

/**
* Dolibarr Platform Structure Definition
* Standard repository structure for the full Dolibarr ERP/CRM installation
*
* This is distinct from dolibarr — it defines the ENTIRE Dolibarr platform
* (htdocs/, not src/). It does NOT have a module descriptor, numero, or
* publish-to-mokodolimods workflow.
*
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* SPDX-License-Identifier: GPL-3.0-or-later
* Schema Version: 1.0
*/
locals {
repository_structure = {
metadata = {
name = "Dolibarr Platform"
description = "Full Dolibarr ERP/CRM installation — htdocs/ root, not a module"
repository_type = "platform"
platform = "dolibarr"
last_updated = "2026-03-31T00:00:00Z"
maintainer = "Moko Consulting"
version = "05.00.00"
schema_version = "1.0"
}
root_files = [
{
name = "README.md"
extension = "md"
description = "Developer-focused documentation"
required = true
always_overwrite = false
protected = true
audience = "developer"
},
{
name = "CONTRIBUTING.md"
extension = "md"
description = "Contribution guidelines"
required = true
always_overwrite = true
template = "templates/docs/required/template-CONTRIBUTING.md"
audience = "contributor"
},
{
name = "LICENSE"
extension = ""
description = "GPL-3.0-or-later license file"
required = true
always_overwrite = true
template = "templates/docs/required/LICENSE"
},
{
name = "composer.json"
extension = "json"
description = "Composer package definition"
required = true
always_overwrite = false
},
{
name = "phpstan.neon"
extension = "neon"
description = "PHPStan static analysis configuration"
required = true
always_overwrite = true
template = "templates/configs/phpstan.neon"
},
{
name = "Makefile"
extension = ""
description = "Build automation targets"
required = true
always_overwrite = true
template = "templates/configs/Makefile"
},
{
name = "src/.ftpignore"
extension = ""
description = "Files excluded from SFTP deployment"
required = true
always_overwrite = true
template = "templates/configs/ftp_ignore"
},
{
name = ".gitea/.mokostandards"
extension = "xml"
description = "MokoStandards XML manifest — generated programmatically by RepositorySynchronizer::migrateMokoStandards()"
required = true
always_overwrite = false
template = "managed-by-sync"
source_type = "programmatic"
},
{
name = "renovate.json"
extension = "json"
description = "Renovate dependency management configuration"
required = true
always_overwrite = false
audience = "developer"
template = "templates/configs/renovate.json"
}
]
directories = [
{
name = "htdocs"
path = "htdocs"
description = "Dolibarr web root — entire platform"
required = true
purpose = "Contains the full Dolibarr installation including core, custom modules, and themes"
},
{
name = "docs"
path = "docs"
description = "Developer and technical documentation"
required = true
purpose = "Contains technical documentation"
files = [
{
name = "update-server.md"
extension = "md"
description = "Dolibarr update server (update.txt) documentation"
required = true
always_overwrite = true
template = "templates/docs/required/template-update-server-dolibarr.md"
}
]
},
{
name = ".mokogitea"
path = ".mokogitea"
description = "Gitea-specific configuration and workflows"
requirement_status = "required"
purpose = "Contains Gitea Actions workflows, manifest.xml, and CI/CD configuration"
subdirectories = [
{
name = "workflows"
path = ".mokogitea/workflows"
description = "Gitea Actions workflows (universal)"
requirement_status = "required"
files = [
{
name = "auto-bump.yml"
extension = "yml"
description = "Auto-bump patch version on push to dev"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/auto-bump.yml"
},
{
name = "auto-release.yml"
extension = "yml"
description = "Universal build and release pipeline on merge to main"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/auto-release.yml"
},
{
name = "branch-cleanup.yml"
extension = "yml"
description = "Auto-delete merged feature branches after PR merge"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/branch-cleanup.yml"
},
{
name = "cascade-dev.yml"
extension = "yml"
description = "Forward-merge main to dev and pre-release branches on push to main"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/cascade-dev.yml"
},
{
name = "cleanup.yml"
extension = "yml"
description = "Scheduled cleanup of retired workflows, stale branches, and old runs"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/cleanup.yml"
},
{
name = "gitleaks.yml"
extension = "yml"
description = "Secret scanning — detect leaked credentials, API keys, and tokens"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/gitleaks.yml"
},
{
name = "issue-branch.yml"
extension = "yml"
description = "Auto-create feature branch from issue assignment"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/issue-branch.yml"
},
{
name = "notify.yml"
extension = "yml"
description = "Notification workflow for release and CI events"
requirement_status = "suggested"
always_overwrite = true
template = ".mokogitea/workflows/notify.yml"
},
{
name = "pr-check.yml"
extension = "yml"
description = "Pull request validation checks"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/pr-check.yml"
},
{
name = "pre-release.yml"
extension = "yml"
description = "Manual pre-release builds for dev/alpha/beta/rc channels"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/pre-release.yml"
},
{
name = "repo-health.yml"
extension = "yml"
description = "Repository health checks and standards validation"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/repo-health.yml"
},
{
name = "security-audit.yml"
extension = "yml"
description = "Dependency and security audit workflow"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/security-audit.yml"
},
{
name = "update-server.yml"
extension = "yml"
description = "Update server XML feed with stability channel entries"
requirement_status = "required"
always_overwrite = true
template = ".mokogitea/workflows/update-server.yml"
}
]
},
{
name = "ISSUE_TEMPLATE"
path = ".mokogitea/ISSUE_TEMPLATE"
description = "Issue templates"
requirement_status = "required"
files = [
{
name = "config.yml"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/config.yml"
},
{
name = "adr.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/adr.md"
},
{
name = "bug_report.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/bug_report.md"
},
{
name = "documentation.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/documentation.md"
},
{
name = "enterprise_support.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/enterprise_support.md"
},
{
name = "feature_request.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/feature_request.md"
},
{
name = "firewall-request.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/firewall-request.md"
},
{
name = "question.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/question.md"
},
{
name = "request-license.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/request-license.md"
},
{
name = "rfc.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/rfc.md"
},
{
name = "security.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/security.md"
},
{
name = "dolibarr_issue.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/dolibarr_issue.md"
},
{
name = "dolibarr_module_id_request.md"
always_overwrite = true
template = "templates/mokogitea/ISSUE_TEMPLATE/dolibarr_module_id_request.md"
}
]
}
]
files = [
{
name = "manifest.xml"
extension = "xml"
description = "Repository manifest — version, platform, governance metadata"
requirement_status = "required"
always_overwrite = false
template = "managed-by-sync"
source_type = "programmatic"
}
]
}
]
}
}
output "crm_platform_structure" {
description = "Dolibarr Platform repository structure definition"
value = local.repository_structure
}