Monorepo for Tangled
1{
2 "lexicon": 1,
3 "id": "sh.tangled.pipeline",
4 "needsCbor": true,
5 "needsType": true,
6 "defs": {
7 "main": {
8 "type": "record",
9 "key": "tid",
10 "record": {
11 "type": "object",
12 "required": [
13 "triggerMetadata",
14 "workflows"
15 ],
16 "properties": {
17 "triggerMetadata": {
18 "type": "ref",
19 "ref": "#triggerMetadata"
20 },
21 "workflows": {
22 "type": "array",
23 "items": {
24 "type": "ref",
25 "ref": "#workflow"
26 }
27 }
28 }
29 }
30 },
31 "triggerMetadata": {
32 "type": "object",
33 "required": [
34 "kind",
35 "repo"
36 ],
37 "properties": {
38 "kind": {
39 "type": "string",
40 "enum": [
41 "push",
42 "pull_request",
43 "manual"
44 ]
45 },
46 "repo": {
47 "type": "ref",
48 "ref": "#triggerRepo"
49 },
50 "push": {
51 "type": "ref",
52 "ref": "#pushTriggerData"
53 },
54 "pullRequest": {
55 "type": "ref",
56 "ref": "#pullRequestTriggerData"
57 },
58 "manual": {
59 "type": "ref",
60 "ref": "#manualTriggerData"
61 }
62 }
63 },
64 "triggerRepo": {
65 "type": "object",
66 "required": [
67 "knot",
68 "did",
69 "defaultBranch"
70 ],
71 "properties": {
72 "knot": {
73 "type": "string"
74 },
75 "did": {
76 "type": "string",
77 "format": "did"
78 },
79 "repoDid": {
80 "type": "string",
81 "description": "DID of the repo itself",
82 "format": "did"
83 },
84 "repo": {
85 "type": "string"
86 },
87 "defaultBranch": {
88 "type": "string"
89 }
90 }
91 },
92 "pushTriggerData": {
93 "type": "object",
94 "required": [
95 "ref",
96 "newSha",
97 "oldSha"
98 ],
99 "properties": {
100 "ref": {
101 "type": "string"
102 },
103 "newSha": {
104 "type": "string",
105 "minLength": 40,
106 "maxLength": 40
107 },
108 "oldSha": {
109 "type": "string",
110 "minLength": 40,
111 "maxLength": 40
112 }
113 }
114 },
115 "pullRequestTriggerData": {
116 "type": "object",
117 "required": [
118 "sourceBranch",
119 "targetBranch",
120 "sourceSha",
121 "action"
122 ],
123 "properties": {
124 "sourceBranch": {
125 "type": "string"
126 },
127 "targetBranch": {
128 "type": "string"
129 },
130 "sourceSha": {
131 "type": "string",
132 "minLength": 40,
133 "maxLength": 40
134 },
135 "action": {
136 "type": "string"
137 }
138 }
139 },
140 "manualTriggerData": {
141 "type": "object",
142 "properties": {
143 "inputs": {
144 "type": "array",
145 "items": {
146 "type": "ref",
147 "ref": "#pair"
148 }
149 }
150 }
151 },
152 "workflow": {
153 "type": "object",
154 "required": [
155 "name",
156 "engine",
157 "clone",
158 "raw"
159 ],
160 "properties": {
161 "name": {
162 "type": "string"
163 },
164 "engine": {
165 "type": "string"
166 },
167 "clone": {
168 "type": "ref",
169 "ref": "#cloneOpts"
170 },
171 "raw": {
172 "type": "string"
173 }
174 }
175 },
176 "cloneOpts": {
177 "type": "object",
178 "required": [
179 "skip",
180 "depth",
181 "submodules"
182 ],
183 "properties": {
184 "skip": {
185 "type": "boolean"
186 },
187 "depth": {
188 "type": "integer"
189 },
190 "submodules": {
191 "type": "boolean"
192 }
193 }
194 },
195 "pair": {
196 "type": "object",
197 "required": [
198 "key",
199 "value"
200 ],
201 "properties": {
202 "key": {
203 "type": "string"
204 },
205 "value": {
206 "type": "string"
207 }
208 }
209 }
210 }
211}