Five tools on the machine the lab runs on: check, run beds against branches on the forge, a run's status, its log, and stop. A run checks out every repository the lab builds, side by side, and runs the suite; one at a time, answered at once with an id (novox/hq ADR 0172).
82 lines
1.6 KiB
JSON
82 lines
1.6 KiB
JSON
{
|
|
"module": "lab",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"own-secrets": {
|
|
"broker": "${dir:mesh-state}/broker"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "mesh"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "work",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh-lab-runs",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "runtime-env",
|
|
"type": "file",
|
|
"path": "${dir:state}/lab.env",
|
|
"mode": "0600",
|
|
"content": "MESH_LAB_FORGE=${setting:forge}\n"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-lab",
|
|
"network": "host",
|
|
"env-file": [
|
|
"${dir:state}/lab.env"
|
|
],
|
|
"volumes": [
|
|
"${dir:mesh-state}/broker:/run/secrets/broker:ro",
|
|
"${dir:work}:${dir:work}",
|
|
"/var/run/docker.sock:/var/run/docker.sock",
|
|
"/var/lib/incus/unix.socket:/var/lib/incus/unix.socket"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_LAB_WORK": "${dir:work}"
|
|
},
|
|
"restart-on": [
|
|
"runtime-env"
|
|
],
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"build": {
|
|
"on": [
|
|
{
|
|
"arg": "BUILD_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "build"
|
|
},
|
|
{
|
|
"arg": "RUNTIME_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"artifacts": [
|
|
{
|
|
"name": "runtime",
|
|
"kind": "image",
|
|
"from": "Dockerfile"
|
|
}
|
|
]
|
|
}
|
|
}
|