Files
mesh-catalog/modules/records/module.json
T

102 lines
2.1 KiB
JSON

{
"module": "records",
"version": "1",
"slug": "records",
"requires": [
"git"
],
"binds": {
"git": "${dir:mesh-state}/git.json"
},
"consumes": [
"gitea.pull.merged"
],
"tools": [
"records_search",
"records_read",
"records_list",
"records_decisions",
"records_status",
"records_sync"
],
"data": {
"own": [
{
"id": "checkout",
"path": "${dir:checkout}",
"class": "rebuildable",
"why": "a clone of the record, cloned again"
}
]
},
"config": {
"repository": {
"type": "string",
"description": "The repository the records module keeps a checkout of and serves the record from, as owner/name on the mesh's forge; the operator's, with no default (novox/hq ADR 0112).",
"pattern": "[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+",
"trusted": true,
"required": true
}
},
"resources": [
{
"id": "mesh-state",
"type": "directory",
"mode": "0700",
"place": "mesh"
},
{
"id": "checkout",
"type": "directory",
"mode": "0700",
"place": "."
},
{
"id": "config",
"type": "file",
"path": "${dir:mesh-state}/config.json",
"mode": "0600",
"template": "files/config.json",
"takes-config": ["repository"],
"merge": "json"
},
{
"id": "origin",
"type": "file",
"path": "${dir:mesh-state}/origin",
"mode": "0600",
"template": "files/origin"
},
{
"id": "git",
"type": "package",
"package": "git"
}
],
"build": {
"artifacts": [
{
"name": "code",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/records",
"binary": "records",
"loads": [
"records"
],
"env": {
"MESH_RECORDS_CONFIG_FILE": "${dir:mesh-state}/config.json",
"MESH_RECORDS_ORIGIN_FILE": "${dir:mesh-state}/origin",
"MESH_RECORDS_DIR": "${dir:checkout}"
}
},
{
"name": "files",
"kind": "archive",
"from": "files"
}
]
}
}