589 lines
14 KiB
JSON
589 lines
14 KiB
JSON
{
|
|
"format": 1,
|
|
"part": "build-step",
|
|
"description": "What the three build seats share: the verbs that read and steer a node's builds, and the layouts of the asks they accept and the steps they keep. A seat lists its states against these (a part carries no states).",
|
|
"verbs": [
|
|
{
|
|
"name": "current",
|
|
"description": "The asks this node runs now (each ask's id, kind, module and when it started), its build capacity, and whether it is paused, taking no new ask.",
|
|
"input": {
|
|
"type": "object",
|
|
"properties": {}
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"description": "the steps running, the capacity and whether paused"
|
|
}
|
|
},
|
|
{
|
|
"name": "pause",
|
|
"description": "Take no new ask on this node until resumed; an ask running here ends in its place. Kept across a restart of the build module. A capacity of 0 is the lasting way to keep a node from building.",
|
|
"input": {
|
|
"type": "object",
|
|
"properties": {}
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"description": "whether the node is paused"
|
|
}
|
|
},
|
|
{
|
|
"name": "resume",
|
|
"description": "Take asks again on this node.",
|
|
"input": {
|
|
"type": "object",
|
|
"properties": {}
|
|
},
|
|
"answer": {
|
|
"type": "object",
|
|
"description": "whether the node is paused"
|
|
}
|
|
}
|
|
],
|
|
"defs": {
|
|
"StepAsk": {
|
|
"type": "object",
|
|
"properties": {
|
|
"v": {
|
|
"type": "integer",
|
|
"description": "the layout version"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"description": "build, check or compose"
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"description": "go, typescript or image"
|
|
},
|
|
"asker": {
|
|
"type": "string"
|
|
},
|
|
"at": {
|
|
"type": "string",
|
|
"description": "when (RFC 3339 time)"
|
|
},
|
|
"build": {
|
|
"type": "object",
|
|
"properties": {
|
|
"module": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"fp": {
|
|
"type": "string"
|
|
},
|
|
"fetch": {
|
|
"description": "what the build module fetches: the repository, commit and directory, as the indexer states it"
|
|
},
|
|
"artifacts": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"artifact": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"seat": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"artifact"
|
|
]
|
|
}
|
|
},
|
|
"publish": {
|
|
"type": "boolean"
|
|
},
|
|
"toolchain": {
|
|
"type": "object",
|
|
"properties": {
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
},
|
|
"recipe": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"language",
|
|
"version",
|
|
"recipe"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"module",
|
|
"artifacts"
|
|
]
|
|
},
|
|
"check": {
|
|
"type": "object",
|
|
"properties": {
|
|
"fetch": {
|
|
"description": "what the build module fetches: the repository, commit and directory, as the indexer states it"
|
|
},
|
|
"levels": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"description": "unit or integration"
|
|
}
|
|
},
|
|
"kept": {
|
|
"type": "boolean"
|
|
},
|
|
"runner": {
|
|
"type": "string"
|
|
},
|
|
"runner_when": {
|
|
"type": "string"
|
|
},
|
|
"run": {
|
|
"type": "string"
|
|
},
|
|
"packages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"fetch",
|
|
"levels"
|
|
]
|
|
},
|
|
"compose": {
|
|
"type": "object",
|
|
"properties": {
|
|
"fetch": {
|
|
"description": "what the build module fetches: the repository, commit and directory, as the indexer states it"
|
|
},
|
|
"dir": {
|
|
"type": "string"
|
|
},
|
|
"package": {
|
|
"type": "string"
|
|
},
|
|
"request": {
|
|
"description": "the compose-candidate request"
|
|
},
|
|
"reader": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"fetch",
|
|
"dir",
|
|
"package",
|
|
"request"
|
|
]
|
|
},
|
|
"needs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"packages": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"description": "package to the tagged version a build pins"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"kind",
|
|
"language",
|
|
"asker"
|
|
],
|
|
"description": "one ask of a build module"
|
|
},
|
|
"BuildAnswer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"artifacts": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"artifact": {
|
|
"type": "string"
|
|
},
|
|
"digest": {
|
|
"type": "string"
|
|
},
|
|
"reference": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"artifact",
|
|
"digest"
|
|
]
|
|
}
|
|
},
|
|
"toolchain": {
|
|
"type": "object",
|
|
"properties": {
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
},
|
|
"recipe": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"language",
|
|
"version",
|
|
"recipe"
|
|
]
|
|
},
|
|
"imports": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"out-of-step": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"artifacts"
|
|
]
|
|
},
|
|
"CheckAnswer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"fetch": {
|
|
"description": "what the build module fetches: the repository, commit and directory, as the indexer states it"
|
|
},
|
|
"levels": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"level": {
|
|
"type": "string"
|
|
},
|
|
"judged": {
|
|
"type": "string"
|
|
},
|
|
"digest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"level": {
|
|
"type": "string"
|
|
},
|
|
"packages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"package": {
|
|
"type": "string"
|
|
},
|
|
"digest": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"package",
|
|
"digest"
|
|
]
|
|
}
|
|
},
|
|
"beside": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"without_tests": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"judged_by": {
|
|
"type": "string"
|
|
},
|
|
"needs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"package": {
|
|
"type": "string"
|
|
},
|
|
"needs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"kept": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"package": {
|
|
"type": "string"
|
|
},
|
|
"digest": {
|
|
"type": "string"
|
|
},
|
|
"tests": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tests": {
|
|
"type": "array",
|
|
"items": {
|
|
"description": "one test's result"
|
|
}
|
|
},
|
|
"unmet": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"package": {
|
|
"type": "string"
|
|
},
|
|
"needs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"level"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"fetch"
|
|
]
|
|
},
|
|
"ComposeAnswer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"built": {
|
|
"type": "boolean"
|
|
},
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"verdict": {
|
|
"description": "the compose-candidate verdict"
|
|
}
|
|
},
|
|
"required": [
|
|
"built"
|
|
]
|
|
},
|
|
"Step": {
|
|
"type": "object",
|
|
"properties": {
|
|
"v": {
|
|
"type": "integer",
|
|
"description": "the layout version"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"tool": {
|
|
"type": "string"
|
|
},
|
|
"node": {
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"description": "running, passed, failed or refused"
|
|
},
|
|
"started": {
|
|
"type": "string",
|
|
"description": "when (RFC 3339 time)"
|
|
},
|
|
"ended": {
|
|
"type": "string",
|
|
"description": "when (RFC 3339 time)"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"result": {
|
|
"description": "what the step answered"
|
|
},
|
|
"what": {
|
|
"type": "string"
|
|
},
|
|
"phase": {
|
|
"type": "string"
|
|
},
|
|
"phase-at": {
|
|
"type": "string",
|
|
"description": "when (RFC 3339 time)"
|
|
},
|
|
"owner": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"tool",
|
|
"node",
|
|
"state",
|
|
"started"
|
|
],
|
|
"description": "one step a build module runs on a node"
|
|
},
|
|
"Toolchain": {
|
|
"type": "object",
|
|
"properties": {
|
|
"v": {
|
|
"type": "integer",
|
|
"description": "the layout version"
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"description": "go or typescript"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
},
|
|
"recipe": {
|
|
"type": "string"
|
|
},
|
|
"at": {
|
|
"type": "string",
|
|
"description": "when (RFC 3339 time)"
|
|
}
|
|
},
|
|
"required": [
|
|
"language",
|
|
"version",
|
|
"recipe"
|
|
],
|
|
"description": "the toolchain a node reports"
|
|
},
|
|
"Pause": {
|
|
"type": "object",
|
|
"properties": {
|
|
"v": {
|
|
"type": "integer",
|
|
"description": "the layout version"
|
|
},
|
|
"paused": {
|
|
"type": "boolean"
|
|
},
|
|
"by": {
|
|
"type": "string"
|
|
},
|
|
"at": {
|
|
"type": "string",
|
|
"description": "when (RFC 3339 time)"
|
|
}
|
|
},
|
|
"required": [
|
|
"paused"
|
|
],
|
|
"description": "whether the node takes no new ask"
|
|
},
|
|
"Capacity": {
|
|
"type": "object",
|
|
"properties": {
|
|
"v": {
|
|
"type": "integer",
|
|
"description": "the layout version"
|
|
},
|
|
"effective": {
|
|
"type": "integer"
|
|
},
|
|
"configured": {
|
|
"type": "integer"
|
|
},
|
|
"configured-from": {
|
|
"type": "string"
|
|
},
|
|
"quota-cores": {
|
|
"type": "number"
|
|
},
|
|
"quota-from": {
|
|
"type": "string"
|
|
},
|
|
"cores-per-step": {
|
|
"type": "number"
|
|
},
|
|
"by-cpu": {
|
|
"type": "integer"
|
|
},
|
|
"build-hours": {
|
|
"type": "string"
|
|
},
|
|
"outside-hours": {
|
|
"type": "boolean"
|
|
},
|
|
"build-hours-fault": {
|
|
"type": "string"
|
|
},
|
|
"ineligible": {
|
|
"type": "string"
|
|
},
|
|
"why": {
|
|
"type": "string"
|
|
},
|
|
"at": {
|
|
"type": "string",
|
|
"description": "when (RFC 3339 time)"
|
|
}
|
|
},
|
|
"required": [
|
|
"effective",
|
|
"configured",
|
|
"why"
|
|
],
|
|
"description": "how many steps the node runs at once"
|
|
}
|
|
}
|
|
}
|