Monorepo for Tangled
tangled.org
1{
2 "lexicon": 1,
3 "id": "sh.tangled.ci.pipeline",
4 "defs": {
5 "main": {
6 "type": "object",
7 "description": "A CI pipeline. Record-like, but owned by the spindle rather than a PDS.",
8 "required": ["id", "trigger", "commit", "workflows"],
9 "properties": {
10 "id": {
11 "type": "string",
12 "description": "Spindle-local pipeline id"
13 },
14 "repo": {
15 "type": "string",
16 "format": "did",
17 "description": "Repository DID"
18 },
19 "trigger": {
20 "type": "union",
21 "refs": [
22 "sh.tangled.ci.trigger#push",
23 "sh.tangled.ci.trigger#pullRequest",
24 "sh.tangled.ci.trigger#manual"
25 ],
26 "description": "Trigger event metadata"
27 },
28 "commit": {
29 "type": "string",
30 "description": "Commit Id this pipeline is running on"
31 },
32 "sourceRepo": {
33 "type": "string",
34 "format": "did",
35 "description": "Repository DID that the commit was checked out from, if different from repo (e.g. a fork for a fork-based pull request)"
36 },
37 "createdAt": {
38 "type": "string",
39 "format": "datetime"
40 },
41 "workflows": {
42 "type": "array",
43 "description": "Triggered workflows",
44 "minLength": 1,
45 "maxLength": 50,
46 "items": {
47 "type": "ref",
48 "ref": "#workflow"
49 }
50 }
51 }
52 },
53 "workflow": {
54 "type": "object",
55 "required": ["id", "name", "status"],
56 "properties": {
57 "id": {
58 "type": "string",
59 "description": "Spindle-local workflow id. Unique per pipeline, usually same as name."
60 },
61 "name": {
62 "type": "string",
63 "description": "Name of the workflow",
64 "minGraphemes": 1,
65 "maxGraphemes": 40
66 },
67 "status": {
68 "type": "string",
69 "description": "Workflow status",
70 "enum": [
71 "pending",
72 "running",
73 "failed",
74 "timeout",
75 "cancelled",
76 "success"
77 ]
78 },
79 "startedAt": {
80 "type": "string",
81 "format": "datetime"
82 },
83 "finishedAt": {
84 "type": "string",
85 "format": "datetime"
86 },
87 "error": {
88 "type": "string"
89 }
90 }
91 }
92 }
93}