@ship.zone/ci-spec 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/.smartconfig.json +46 -0
  2. package/changelog.md +190 -0
  3. package/conformance/archive-cases.json +446 -0
  4. package/conformance/ci-actions/compile-invalid/build-arg-secret-collision.yml +31 -0
  5. package/conformance/ci-actions/compile-invalid/candidate-without-needs.yml +36 -0
  6. package/conformance/ci-actions/compile-invalid/needs-wider-triggers.yml +42 -0
  7. package/conformance/ci-actions/compile-invalid/npm-read-registry-not-allowlisted.yml +34 -0
  8. package/conformance/ci-actions/compile-invalid/publish-job-excludes-tag.yml +57 -0
  9. package/conformance/ci-actions/compile-invalid/shared-memory-above-memory.yml +28 -0
  10. package/conformance/ci-actions/compile-invalid/trigger-kind-without-job.yml +30 -0
  11. package/conformance/ci-actions/invalid/alias-affix-invalid.yml +33 -0
  12. package/conformance/ci-actions/invalid/alias.yml +32 -0
  13. package/conformance/ci-actions/invalid/bridge-network.yml +27 -0
  14. package/conformance/ci-actions/invalid/build-darwin-platform.yml +24 -0
  15. package/conformance/ci-actions/invalid/build-with-steps.yml +27 -0
  16. package/conformance/ci-actions/invalid/concurrency-empty-group.yml +28 -0
  17. package/conformance/ci-actions/invalid/concurrency-without-cancel-in-progress.yml +27 -0
  18. package/conformance/ci-actions/invalid/container-job-build-profile.yml +25 -0
  19. package/conformance/ci-actions/invalid/custom-tag.txt +23 -0
  20. package/conformance/ci-actions/invalid/duplicate-key.txt +24 -0
  21. package/conformance/ci-actions/invalid/egress-bare-wildcard.yml +29 -0
  22. package/conformance/ci-actions/invalid/egress-empty-allowlist.yml +28 -0
  23. package/conformance/ci-actions/invalid/egress-ip-literal.yml +29 -0
  24. package/conformance/ci-actions/invalid/egress-single-label-wildcard.yml +29 -0
  25. package/conformance/ci-actions/invalid/job-publish-permission.yml +28 -0
  26. package/conformance/ci-actions/invalid/job-trigger-undeclared-kind.yml +27 -0
  27. package/conformance/ci-actions/invalid/literal-alias-affix.yml +33 -0
  28. package/conformance/ci-actions/invalid/missing-spec.yml +24 -0
  29. package/conformance/ci-actions/invalid/multiple-documents.yml +25 -0
  30. package/conformance/ci-actions/invalid/npm-read-invalid-scope.yml +33 -0
  31. package/conformance/ci-actions/invalid/oci-darwin-platform.yml +25 -0
  32. package/conformance/ci-actions/invalid/permission-without-publication.yml +31 -0
  33. package/conformance/ci-actions/invalid/publish-order-duplicate.yml +50 -0
  34. package/conformance/ci-actions/invalid/publish-order-missing-kind.yml +48 -0
  35. package/conformance/ci-actions/invalid/publish-order-undeclared-kind.yml +45 -0
  36. package/conformance/ci-actions/invalid/publish-without-permission.yml +31 -0
  37. package/conformance/ci-actions/invalid/publish-without-tag-trigger.yml +31 -0
  38. package/conformance/ci-actions/invalid/release-notes-without-assets.yml +46 -0
  39. package/conformance/ci-actions/invalid/reserved-label-prefix.yml +25 -0
  40. package/conformance/ci-actions/invalid/reserved-label.yml +25 -0
  41. package/conformance/ci-actions/invalid/retention-above-maximum.yml +83 -0
  42. package/conformance/ci-actions/invalid/retention-below-minimum.yml +83 -0
  43. package/conformance/ci-actions/invalid/schema-version-field.yml +26 -0
  44. package/conformance/ci-actions/invalid/shared-memory-below-minimum.yml +28 -0
  45. package/conformance/ci-actions/invalid/shell-string.yml +21 -0
  46. package/conformance/ci-actions/invalid/spec-number.yml +25 -0
  47. package/conformance/ci-actions/invalid/spec-prerelease.yml +25 -0
  48. package/conformance/ci-actions/invalid/spec-range.yml +25 -0
  49. package/conformance/ci-actions/invalid/timeout-above-maximum.yml +26 -0
  50. package/conformance/ci-actions/invalid/timeout-below-minimum.yml +26 -0
  51. package/conformance/ci-actions/invalid/unknown-alias-kind.yml +31 -0
  52. package/conformance/ci-actions/invalid/unknown-key.yml +24 -0
  53. package/conformance/ci-actions/invalid/vm-darwin-candidate.yml +38 -0
  54. package/conformance/ci-actions/invalid/vm-darwin-shared-memory.yml +28 -0
  55. package/conformance/ci-actions/invalid/vm-oci-execution.yml +25 -0
  56. package/conformance/ci-actions/invalid/vm-unsupported-platform.yml +25 -0
  57. package/conformance/ci-actions/invalid/vm-without-platform.yml +24 -0
  58. package/conformance/ci-actions/valid/concurrency.yml +83 -0
  59. package/conformance/ci-actions/valid/egress.yml +40 -0
  60. package/conformance/ci-actions/valid/image-build.yml +80 -0
  61. package/conformance/ci-actions/valid/matrix.yml +45 -0
  62. package/conformance/ci-actions/valid/minimal.yml +25 -0
  63. package/conformance/ci-actions/valid/npm-read.yml +60 -0
  64. package/conformance/ci-actions/valid/release-assets.yml +114 -0
  65. package/conformance/ci-actions/valid/release-signing.yml +71 -0
  66. package/conformance/ci-actions/valid/release.yml +109 -0
  67. package/conformance/ci-actions/valid/resources.yml +79 -0
  68. package/conformance/ci-actions/valid/vm.yml +77 -0
  69. package/conformance/compile-cases.json +5885 -0
  70. package/conformance/compile-cases.schema.json +766 -0
  71. package/conformance/digest-cases.json +144 -0
  72. package/conformance/runner-cases.json +1238 -0
  73. package/conformance/runner-jobs/invalid/bridge-network.json +70 -0
  74. package/conformance/runner-jobs/invalid/build-darwin-platform.json +100 -0
  75. package/conformance/runner-jobs/invalid/build-with-steps.json +111 -0
  76. package/conformance/runner-jobs/invalid/build-without-microvm.json +100 -0
  77. package/conformance/runner-jobs/invalid/egress-empty-allowlist.json +71 -0
  78. package/conformance/runner-jobs/invalid/mutable-image.json +70 -0
  79. package/conformance/runner-jobs/invalid/npm-read-reserved-environment.json +82 -0
  80. package/conformance/runner-jobs/invalid/oci-darwin-platform.json +71 -0
  81. package/conformance/runner-jobs/invalid/push-permission-container.json +70 -0
  82. package/conformance/runner-jobs/invalid/shared-memory-below-minimum.json +71 -0
  83. package/conformance/runner-jobs/invalid/timeout-missing.json +69 -0
  84. package/conformance/runner-jobs/invalid/vm-without-microvm.json +82 -0
  85. package/conformance/runner-jobs/valid/candidate-test.json +72 -0
  86. package/conformance/runner-jobs/valid/egress.json +80 -0
  87. package/conformance/runner-jobs/valid/image-build.json +100 -0
  88. package/conformance/runner-jobs/valid/minimal.json +70 -0
  89. package/conformance/runner-jobs/valid/npm-read.json +81 -0
  90. package/conformance/runner-jobs/valid/resources.json +71 -0
  91. package/conformance/runner-jobs/valid/timeout-retention-defaults.json +91 -0
  92. package/conformance/runner-jobs/valid/vm-darwin.json +70 -0
  93. package/conformance/runner-jobs/valid/vm.json +82 -0
  94. package/conformance/runner-messages.json +2035 -0
  95. package/conformance/version-cases.json +125 -0
  96. package/dist_ts/00_commitinfo_data.d.ts +8 -0
  97. package/dist_ts/00_commitinfo_data.js +9 -0
  98. package/dist_ts/constants.d.ts +199 -0
  99. package/dist_ts/constants.js +106 -0
  100. package/dist_ts/index.d.ts +1 -0
  101. package/dist_ts/index.js +2 -0
  102. package/dist_ts/plugins.d.ts +1 -0
  103. package/dist_ts/plugins.js +3 -0
  104. package/examples/ci_actions.yml +64 -0
  105. package/license.md +21 -0
  106. package/package.json +72 -0
  107. package/readme.md +146 -0
  108. package/schemas/ci_actions.schema.json +1664 -0
  109. package/schemas/runner-job.schema.json +1172 -0
  110. package/spec/ci-actions.md +433 -0
  111. package/spec/runner-protocol.md +378 -0
  112. package/spec/runner.openapi.json +2182 -0
  113. package/ts/00_commitinfo_data.ts +8 -0
  114. package/ts/constants.ts +112 -0
  115. package/ts/index.ts +1 -0
  116. package/ts/plugins.ts +1 -0
@@ -0,0 +1,1664 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ship.zone/spec/ci/schemas/ci_actions.schema.json",
4
+ "title": "ship.zone ci_actions.yml",
5
+ "description": "Source-controlled CI workflow compiled by a coordinator from an exact repository commit.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["spec", "on", "permissions", "jobs"],
9
+ "properties": {
10
+ "spec": {
11
+ "$ref": "#/$defs/specVersion"
12
+ },
13
+ "on": {
14
+ "$ref": "#/$defs/triggers"
15
+ },
16
+ "permissions": {
17
+ "$ref": "#/$defs/workflowPermissions"
18
+ },
19
+ "concurrency": {
20
+ "$ref": "#/$defs/concurrency"
21
+ },
22
+ "environment": {
23
+ "$ref": "#/$defs/environment"
24
+ },
25
+ "jobs": {
26
+ "type": "object",
27
+ "minProperties": 1,
28
+ "maxProperties": 128,
29
+ "propertyNames": {
30
+ "$ref": "#/$defs/identifier"
31
+ },
32
+ "additionalProperties": {
33
+ "$ref": "#/$defs/job"
34
+ }
35
+ },
36
+ "publish": {
37
+ "$ref": "#/$defs/publish"
38
+ }
39
+ },
40
+ "allOf": [
41
+ {
42
+ "if": {
43
+ "type": "object",
44
+ "properties": {
45
+ "publish": {}
46
+ },
47
+ "required": ["publish"]
48
+ },
49
+ "then": {
50
+ "type": "object",
51
+ "properties": {
52
+ "on": {
53
+ "type": "object",
54
+ "properties": {
55
+ "tag": {}
56
+ },
57
+ "required": ["tag"]
58
+ }
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "if": {
64
+ "type": "object",
65
+ "properties": {
66
+ "permissions": {
67
+ "type": "object",
68
+ "properties": {
69
+ "images": {
70
+ "const": "publish"
71
+ }
72
+ },
73
+ "required": ["images"]
74
+ }
75
+ },
76
+ "required": ["permissions"]
77
+ },
78
+ "then": {
79
+ "type": "object",
80
+ "properties": {
81
+ "publish": {
82
+ "type": "object",
83
+ "properties": {
84
+ "images": {}
85
+ },
86
+ "required": ["images"]
87
+ }
88
+ },
89
+ "required": ["publish"]
90
+ },
91
+ "else": {
92
+ "type": "object",
93
+ "properties": {
94
+ "publish": {
95
+ "type": "object",
96
+ "properties": {
97
+ "images": false
98
+ }
99
+ }
100
+ }
101
+ }
102
+ },
103
+ {
104
+ "if": {
105
+ "type": "object",
106
+ "properties": {
107
+ "permissions": {
108
+ "type": "object",
109
+ "properties": {
110
+ "npm": {
111
+ "const": "publish"
112
+ }
113
+ },
114
+ "required": ["npm"]
115
+ }
116
+ },
117
+ "required": ["permissions"]
118
+ },
119
+ "then": {
120
+ "type": "object",
121
+ "properties": {
122
+ "publish": {
123
+ "type": "object",
124
+ "properties": {
125
+ "npm": {}
126
+ },
127
+ "required": ["npm"]
128
+ }
129
+ },
130
+ "required": ["publish"]
131
+ },
132
+ "else": {
133
+ "type": "object",
134
+ "properties": {
135
+ "publish": {
136
+ "type": "object",
137
+ "properties": {
138
+ "npm": false
139
+ }
140
+ }
141
+ }
142
+ }
143
+ },
144
+ {
145
+ "if": {
146
+ "type": "object",
147
+ "properties": {
148
+ "permissions": {
149
+ "type": "object",
150
+ "properties": {
151
+ "releaseAssets": {
152
+ "const": "publish"
153
+ }
154
+ },
155
+ "required": ["releaseAssets"]
156
+ }
157
+ },
158
+ "required": ["permissions"]
159
+ },
160
+ "then": {
161
+ "type": "object",
162
+ "properties": {
163
+ "publish": {
164
+ "type": "object",
165
+ "properties": {
166
+ "releaseAssets": {}
167
+ },
168
+ "required": ["releaseAssets"]
169
+ }
170
+ },
171
+ "required": ["publish"]
172
+ },
173
+ "else": {
174
+ "type": "object",
175
+ "properties": {
176
+ "publish": {
177
+ "type": "object",
178
+ "properties": {
179
+ "releaseAssets": false
180
+ }
181
+ }
182
+ }
183
+ }
184
+ },
185
+ {
186
+ "if": {
187
+ "type": "object",
188
+ "properties": {
189
+ "on": {
190
+ "type": "object",
191
+ "not": {
192
+ "type": "object",
193
+ "properties": {
194
+ "push": {}
195
+ },
196
+ "required": ["push"]
197
+ }
198
+ }
199
+ },
200
+ "required": ["on"]
201
+ },
202
+ "then": {
203
+ "type": "object",
204
+ "properties": {
205
+ "jobs": {
206
+ "type": "object",
207
+ "additionalProperties": {
208
+ "type": "object",
209
+ "properties": {
210
+ "triggers": {
211
+ "type": "array",
212
+ "not": {
213
+ "contains": {
214
+ "const": "push"
215
+ }
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ }
223
+ },
224
+ {
225
+ "if": {
226
+ "type": "object",
227
+ "properties": {
228
+ "on": {
229
+ "type": "object",
230
+ "not": {
231
+ "type": "object",
232
+ "properties": {
233
+ "tag": {}
234
+ },
235
+ "required": ["tag"]
236
+ }
237
+ }
238
+ },
239
+ "required": ["on"]
240
+ },
241
+ "then": {
242
+ "type": "object",
243
+ "properties": {
244
+ "jobs": {
245
+ "type": "object",
246
+ "additionalProperties": {
247
+ "type": "object",
248
+ "properties": {
249
+ "triggers": {
250
+ "type": "array",
251
+ "not": {
252
+ "contains": {
253
+ "const": "tag"
254
+ }
255
+ }
256
+ }
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ },
263
+ {
264
+ "if": {
265
+ "type": "object",
266
+ "properties": {
267
+ "on": {
268
+ "type": "object",
269
+ "not": {
270
+ "type": "object",
271
+ "properties": {
272
+ "pullRequest": {}
273
+ },
274
+ "required": ["pullRequest"]
275
+ }
276
+ }
277
+ },
278
+ "required": ["on"]
279
+ },
280
+ "then": {
281
+ "type": "object",
282
+ "properties": {
283
+ "jobs": {
284
+ "type": "object",
285
+ "additionalProperties": {
286
+ "type": "object",
287
+ "properties": {
288
+ "triggers": {
289
+ "type": "array",
290
+ "not": {
291
+ "contains": {
292
+ "const": "pullRequest"
293
+ }
294
+ }
295
+ }
296
+ }
297
+ }
298
+ }
299
+ }
300
+ }
301
+ },
302
+ {
303
+ "if": {
304
+ "type": "object",
305
+ "properties": {
306
+ "on": {
307
+ "type": "object",
308
+ "not": {
309
+ "type": "object",
310
+ "properties": {
311
+ "manual": {}
312
+ },
313
+ "required": ["manual"]
314
+ }
315
+ }
316
+ },
317
+ "required": ["on"]
318
+ },
319
+ "then": {
320
+ "type": "object",
321
+ "properties": {
322
+ "jobs": {
323
+ "type": "object",
324
+ "additionalProperties": {
325
+ "type": "object",
326
+ "properties": {
327
+ "triggers": {
328
+ "type": "array",
329
+ "not": {
330
+ "contains": {
331
+ "const": "manual"
332
+ }
333
+ }
334
+ }
335
+ }
336
+ }
337
+ }
338
+ }
339
+ }
340
+ }
341
+ ],
342
+ "$defs": {
343
+ "specVersion": {
344
+ "description": "A released @ship.zone/ci-spec package version in canonical MAJOR.MINOR.PATCH form without prerelease or build metadata. Each component has at most 15 digits, so every component is a safe integer.",
345
+ "type": "string",
346
+ "pattern": "^(?:0|[1-9][0-9]{0,14})\\.(?:0|[1-9][0-9]{0,14})\\.(?:0|[1-9][0-9]{0,14})$"
347
+ },
348
+ "containerProfile": {
349
+ "const": "oci"
350
+ },
351
+ "imageBuildProfile": {
352
+ "const": "oci-image"
353
+ },
354
+ "vmProfile": {
355
+ "const": "vm"
356
+ },
357
+ "executionProfile": {
358
+ "anyOf": [
359
+ {
360
+ "$ref": "#/$defs/containerProfile"
361
+ },
362
+ {
363
+ "$ref": "#/$defs/imageBuildProfile"
364
+ },
365
+ {
366
+ "$ref": "#/$defs/vmProfile"
367
+ }
368
+ ]
369
+ },
370
+ "triggerKind": {
371
+ "enum": ["push", "tag", "pullRequest", "manual"]
372
+ },
373
+ "identifier": {
374
+ "type": "string",
375
+ "minLength": 1,
376
+ "maxLength": 64,
377
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
378
+ },
379
+ "objectId": {
380
+ "type": "string",
381
+ "minLength": 40,
382
+ "maxLength": 64,
383
+ "pattern": "^[a-f0-9]+$"
384
+ },
385
+ "branchPatterns": {
386
+ "type": "array",
387
+ "minItems": 1,
388
+ "maxItems": 64,
389
+ "uniqueItems": true,
390
+ "items": {
391
+ "type": "string",
392
+ "minLength": 1,
393
+ "maxLength": 256
394
+ }
395
+ },
396
+ "triggers": {
397
+ "type": "object",
398
+ "additionalProperties": false,
399
+ "minProperties": 1,
400
+ "properties": {
401
+ "push": {
402
+ "type": "object",
403
+ "additionalProperties": false,
404
+ "properties": {
405
+ "branches": {
406
+ "$ref": "#/$defs/branchPatterns"
407
+ }
408
+ }
409
+ },
410
+ "tag": {
411
+ "type": "object",
412
+ "additionalProperties": false,
413
+ "properties": {
414
+ "tags": {
415
+ "$ref": "#/$defs/branchPatterns"
416
+ }
417
+ }
418
+ },
419
+ "pullRequest": {
420
+ "type": "object",
421
+ "additionalProperties": false,
422
+ "properties": {
423
+ "targetBranches": {
424
+ "$ref": "#/$defs/branchPatterns"
425
+ }
426
+ }
427
+ },
428
+ "manual": {
429
+ "$ref": "#/$defs/manualTrigger"
430
+ }
431
+ }
432
+ },
433
+ "manualTrigger": {
434
+ "type": "object",
435
+ "additionalProperties": false,
436
+ "properties": {
437
+ "inputs": {
438
+ "type": "object",
439
+ "maxProperties": 32,
440
+ "propertyNames": {
441
+ "$ref": "#/$defs/identifier"
442
+ },
443
+ "additionalProperties": {
444
+ "type": "object",
445
+ "additionalProperties": false,
446
+ "required": ["type", "required"],
447
+ "properties": {
448
+ "type": {
449
+ "enum": ["string", "boolean", "choice"]
450
+ },
451
+ "required": {
452
+ "type": "boolean"
453
+ },
454
+ "description": {
455
+ "type": "string",
456
+ "maxLength": 512
457
+ },
458
+ "options": {
459
+ "type": "array",
460
+ "minItems": 1,
461
+ "maxItems": 64,
462
+ "uniqueItems": true,
463
+ "items": {
464
+ "type": "string",
465
+ "maxLength": 256
466
+ }
467
+ }
468
+ },
469
+ "allOf": [
470
+ {
471
+ "if": {
472
+ "properties": {
473
+ "type": {
474
+ "const": "choice"
475
+ }
476
+ },
477
+ "required": ["type"]
478
+ },
479
+ "then": {
480
+ "properties": {
481
+ "options": {}
482
+ },
483
+ "required": ["options"]
484
+ },
485
+ "else": {
486
+ "not": {
487
+ "required": ["options"]
488
+ }
489
+ }
490
+ }
491
+ ]
492
+ }
493
+ }
494
+ }
495
+ },
496
+ "workflowPermissions": {
497
+ "type": "object",
498
+ "additionalProperties": false,
499
+ "required": ["source", "artifacts", "caches", "images", "npm", "releaseAssets"],
500
+ "properties": {
501
+ "source": {
502
+ "const": "read"
503
+ },
504
+ "artifacts": {
505
+ "enum": ["none", "write"]
506
+ },
507
+ "caches": {
508
+ "enum": ["none", "read", "read-write"]
509
+ },
510
+ "images": {
511
+ "enum": ["none", "candidate", "publish"]
512
+ },
513
+ "npm": {
514
+ "enum": ["none", "publish"]
515
+ },
516
+ "releaseAssets": {
517
+ "enum": ["none", "publish"]
518
+ }
519
+ }
520
+ },
521
+ "jobPermissions": {
522
+ "type": "object",
523
+ "additionalProperties": false,
524
+ "required": ["source", "artifacts", "caches", "images"],
525
+ "properties": {
526
+ "source": {
527
+ "const": "read"
528
+ },
529
+ "artifacts": {
530
+ "enum": ["none", "write"]
531
+ },
532
+ "caches": {
533
+ "enum": ["none", "read", "read-write"]
534
+ },
535
+ "images": {
536
+ "enum": ["none", "candidate"]
537
+ }
538
+ }
539
+ },
540
+ "concurrency": {
541
+ "type": "object",
542
+ "additionalProperties": false,
543
+ "required": ["group", "cancelInProgress"],
544
+ "properties": {
545
+ "group": {
546
+ "type": "string",
547
+ "minLength": 1,
548
+ "maxLength": 128
549
+ },
550
+ "cancelInProgress": {
551
+ "type": "boolean"
552
+ }
553
+ }
554
+ },
555
+ "job": {
556
+ "type": "object",
557
+ "unevaluatedProperties": false,
558
+ "required": ["runner"],
559
+ "properties": {
560
+ "name": {
561
+ "type": "string",
562
+ "minLength": 1,
563
+ "maxLength": 128
564
+ },
565
+ "needs": {
566
+ "type": "array",
567
+ "maxItems": 32,
568
+ "uniqueItems": true,
569
+ "items": {
570
+ "$ref": "#/$defs/identifier"
571
+ }
572
+ },
573
+ "triggers": {
574
+ "type": "array",
575
+ "minItems": 1,
576
+ "maxItems": 4,
577
+ "uniqueItems": true,
578
+ "items": {
579
+ "$ref": "#/$defs/triggerKind"
580
+ }
581
+ },
582
+ "runner": {
583
+ "$ref": "#/$defs/runner"
584
+ },
585
+ "permissions": {
586
+ "$ref": "#/$defs/jobPermissions"
587
+ },
588
+ "secrets": {
589
+ "type": "array",
590
+ "maxItems": 128,
591
+ "uniqueItems": true,
592
+ "items": {
593
+ "$ref": "#/$defs/secretReference"
594
+ }
595
+ },
596
+ "network": {
597
+ "$ref": "#/$defs/network"
598
+ },
599
+ "timeoutMs": {
600
+ "type": "integer",
601
+ "minimum": 1000,
602
+ "maximum": 86400000
603
+ },
604
+ "resources": {
605
+ "$ref": "#/$defs/resources"
606
+ },
607
+ "npmRead": {
608
+ "$ref": "#/$defs/npmRead"
609
+ }
610
+ },
611
+ "oneOf": [
612
+ {
613
+ "$ref": "#/$defs/containerJob"
614
+ },
615
+ {
616
+ "$ref": "#/$defs/imageBuildJob"
617
+ },
618
+ {
619
+ "$ref": "#/$defs/vmJob"
620
+ }
621
+ ]
622
+ },
623
+ "containerJob": {
624
+ "type": "object",
625
+ "required": ["execution", "steps"],
626
+ "properties": {
627
+ "runner": {
628
+ "type": "object",
629
+ "properties": {
630
+ "profile": {
631
+ "$ref": "#/$defs/containerProfile"
632
+ },
633
+ "platform": {
634
+ "$ref": "#/$defs/linuxPlatform"
635
+ }
636
+ }
637
+ },
638
+ "matrix": {
639
+ "$ref": "#/$defs/matrix"
640
+ },
641
+ "execution": {
642
+ "$ref": "#/$defs/ociExecution"
643
+ },
644
+ "environment": {
645
+ "$ref": "#/$defs/environment"
646
+ },
647
+ "steps": {
648
+ "type": "array",
649
+ "minItems": 1,
650
+ "maxItems": 128,
651
+ "items": {
652
+ "$ref": "#/$defs/step"
653
+ }
654
+ },
655
+ "artifacts": {
656
+ "type": "array",
657
+ "maxItems": 64,
658
+ "items": {
659
+ "$ref": "#/$defs/artifact"
660
+ }
661
+ },
662
+ "caches": {
663
+ "type": "array",
664
+ "maxItems": 32,
665
+ "items": {
666
+ "$ref": "#/$defs/cache"
667
+ }
668
+ }
669
+ }
670
+ },
671
+ "imageBuildJob": {
672
+ "type": "object",
673
+ "required": ["build"],
674
+ "properties": {
675
+ "runner": {
676
+ "type": "object",
677
+ "properties": {
678
+ "profile": {
679
+ "$ref": "#/$defs/imageBuildProfile"
680
+ },
681
+ "platform": false
682
+ }
683
+ },
684
+ "build": {
685
+ "$ref": "#/$defs/imageBuild"
686
+ },
687
+ "caches": {
688
+ "type": "array",
689
+ "maxItems": 1,
690
+ "items": {
691
+ "$ref": "#/$defs/buildCache"
692
+ }
693
+ }
694
+ }
695
+ },
696
+ "vmJob": {
697
+ "type": "object",
698
+ "required": ["execution", "steps"],
699
+ "properties": {
700
+ "runner": {
701
+ "type": "object",
702
+ "required": ["platform"],
703
+ "properties": {
704
+ "profile": {
705
+ "$ref": "#/$defs/vmProfile"
706
+ },
707
+ "platform": {
708
+ "$ref": "#/$defs/vmPlatform"
709
+ }
710
+ }
711
+ },
712
+ "matrix": {
713
+ "$ref": "#/$defs/matrix"
714
+ },
715
+ "execution": {
716
+ "$ref": "#/$defs/vmExecution"
717
+ },
718
+ "environment": {
719
+ "$ref": "#/$defs/environment"
720
+ },
721
+ "steps": {
722
+ "type": "array",
723
+ "minItems": 1,
724
+ "maxItems": 128,
725
+ "items": {
726
+ "$ref": "#/$defs/step"
727
+ }
728
+ },
729
+ "artifacts": {
730
+ "type": "array",
731
+ "maxItems": 64,
732
+ "items": {
733
+ "$ref": "#/$defs/artifact"
734
+ }
735
+ },
736
+ "caches": {
737
+ "type": "array",
738
+ "maxItems": 32,
739
+ "items": {
740
+ "$ref": "#/$defs/cache"
741
+ }
742
+ }
743
+ },
744
+ "allOf": [
745
+ {
746
+ "$ref": "#/$defs/darwinGuestRestrictions"
747
+ }
748
+ ]
749
+ },
750
+ "darwinGuestRestrictions": {
751
+ "description": "A darwin guest boots a digest-pinned VM image and has no /dev/shm.",
752
+ "if": {
753
+ "type": "object",
754
+ "properties": {
755
+ "runner": {
756
+ "type": "object",
757
+ "properties": {
758
+ "platform": {
759
+ "const": "darwin/arm64"
760
+ }
761
+ },
762
+ "required": ["platform"]
763
+ }
764
+ },
765
+ "required": ["runner"]
766
+ },
767
+ "then": {
768
+ "type": "object",
769
+ "properties": {
770
+ "execution": {
771
+ "type": "object",
772
+ "properties": {
773
+ "image": {
774
+ "$ref": "#/$defs/pinnedImage"
775
+ }
776
+ }
777
+ },
778
+ "resources": {
779
+ "type": "object",
780
+ "properties": {
781
+ "sharedMemoryBytes": false
782
+ }
783
+ }
784
+ }
785
+ }
786
+ },
787
+ "runner": {
788
+ "type": "object",
789
+ "additionalProperties": false,
790
+ "required": ["profile", "labels"],
791
+ "properties": {
792
+ "profile": {
793
+ "$ref": "#/$defs/executionProfile"
794
+ },
795
+ "labels": {
796
+ "type": "array",
797
+ "maxItems": 32,
798
+ "uniqueItems": true,
799
+ "items": {
800
+ "$ref": "#/$defs/identifier"
801
+ }
802
+ },
803
+ "platform": {
804
+ "$ref": "#/$defs/platform"
805
+ }
806
+ }
807
+ },
808
+ "platform": {
809
+ "type": "string",
810
+ "minLength": 3,
811
+ "maxLength": 64,
812
+ "pattern": "^[a-z0-9]+/[a-z0-9_]+(?:/[a-z0-9]+)?$"
813
+ },
814
+ "network": {
815
+ "oneOf": [
816
+ {
817
+ "type": "object",
818
+ "additionalProperties": false,
819
+ "required": ["mode"],
820
+ "properties": {
821
+ "mode": {
822
+ "const": "none"
823
+ }
824
+ }
825
+ },
826
+ {
827
+ "type": "object",
828
+ "additionalProperties": false,
829
+ "required": ["mode", "allow"],
830
+ "properties": {
831
+ "mode": {
832
+ "const": "egress"
833
+ },
834
+ "allow": {
835
+ "type": "array",
836
+ "minItems": 1,
837
+ "maxItems": 64,
838
+ "uniqueItems": true,
839
+ "items": {
840
+ "$ref": "#/$defs/egressRule"
841
+ }
842
+ }
843
+ }
844
+ }
845
+ ]
846
+ },
847
+ "egressRule": {
848
+ "type": "object",
849
+ "additionalProperties": false,
850
+ "required": ["host"],
851
+ "properties": {
852
+ "host": {
853
+ "$ref": "#/$defs/egressHost"
854
+ },
855
+ "ports": {
856
+ "type": "array",
857
+ "minItems": 1,
858
+ "maxItems": 16,
859
+ "uniqueItems": true,
860
+ "items": {
861
+ "type": "integer",
862
+ "minimum": 1,
863
+ "maximum": 65535
864
+ }
865
+ }
866
+ }
867
+ },
868
+ "egressHost": {
869
+ "type": "string",
870
+ "minLength": 3,
871
+ "maxLength": 253,
872
+ "pattern": "^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"
873
+ },
874
+ "pinnedImage": {
875
+ "type": "string",
876
+ "minLength": 73,
877
+ "maxLength": 1024,
878
+ "pattern": "^[^\\s@]+@sha256:[a-f0-9]{64}$"
879
+ },
880
+ "candidateReference": {
881
+ "type": "object",
882
+ "additionalProperties": false,
883
+ "required": ["candidate"],
884
+ "properties": {
885
+ "candidate": {
886
+ "$ref": "#/$defs/identifier"
887
+ }
888
+ }
889
+ },
890
+ "imageReference": {
891
+ "oneOf": [
892
+ {
893
+ "$ref": "#/$defs/pinnedImage"
894
+ },
895
+ {
896
+ "$ref": "#/$defs/candidateReference"
897
+ }
898
+ ]
899
+ },
900
+ "ociExecution": {
901
+ "type": "object",
902
+ "additionalProperties": false,
903
+ "required": ["profile", "image"],
904
+ "properties": {
905
+ "profile": {
906
+ "$ref": "#/$defs/containerProfile"
907
+ },
908
+ "image": {
909
+ "$ref": "#/$defs/imageReference"
910
+ },
911
+ "workingDirectory": {
912
+ "type": "string",
913
+ "minLength": 1,
914
+ "maxLength": 256,
915
+ "pattern": "^/[A-Za-z0-9._/-]+$"
916
+ }
917
+ }
918
+ },
919
+ "vmExecution": {
920
+ "type": "object",
921
+ "additionalProperties": false,
922
+ "required": ["profile", "image"],
923
+ "properties": {
924
+ "profile": {
925
+ "$ref": "#/$defs/vmProfile"
926
+ },
927
+ "image": {
928
+ "$ref": "#/$defs/imageReference"
929
+ },
930
+ "workingDirectory": {
931
+ "type": "string",
932
+ "minLength": 1,
933
+ "maxLength": 256,
934
+ "pattern": "^/[A-Za-z0-9._/-]+$"
935
+ }
936
+ }
937
+ },
938
+ "linuxPlatform": {
939
+ "description": "Platforms of the oci and oci-image profiles, which execute only linux.",
940
+ "type": "string",
941
+ "allOf": [
942
+ {
943
+ "$ref": "#/$defs/platform"
944
+ }
945
+ ],
946
+ "pattern": "^linux/"
947
+ },
948
+ "vmPlatform": {
949
+ "description": "Guest platforms of the vm profile: every linux platform, and darwin/arm64.",
950
+ "anyOf": [
951
+ {
952
+ "$ref": "#/$defs/linuxPlatform"
953
+ },
954
+ {
955
+ "const": "darwin/arm64"
956
+ }
957
+ ]
958
+ },
959
+ "imageBuild": {
960
+ "type": "object",
961
+ "additionalProperties": false,
962
+ "required": ["context", "dockerfile", "platforms"],
963
+ "properties": {
964
+ "context": {
965
+ "$ref": "#/$defs/relativePath"
966
+ },
967
+ "dockerfile": {
968
+ "$ref": "#/$defs/relativePath"
969
+ },
970
+ "target": {
971
+ "$ref": "#/$defs/identifier"
972
+ },
973
+ "platforms": {
974
+ "type": "array",
975
+ "minItems": 1,
976
+ "maxItems": 8,
977
+ "uniqueItems": true,
978
+ "items": {
979
+ "$ref": "#/$defs/linuxPlatform"
980
+ }
981
+ },
982
+ "buildArgs": {
983
+ "$ref": "#/$defs/buildArgs"
984
+ },
985
+ "secrets": {
986
+ "type": "array",
987
+ "maxItems": 32,
988
+ "uniqueItems": true,
989
+ "items": {
990
+ "$ref": "#/$defs/buildSecret"
991
+ }
992
+ },
993
+ "labels": {
994
+ "type": "object",
995
+ "maxProperties": 60,
996
+ "propertyNames": {
997
+ "maxLength": 128,
998
+ "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$",
999
+ "not": {
1000
+ "anyOf": [
1001
+ {
1002
+ "enum": ["org.opencontainers.image.revision", "org.opencontainers.image.source", "org.opencontainers.image.version"]
1003
+ },
1004
+ {
1005
+ "pattern": "^zone\\.ship\\.ci\\."
1006
+ }
1007
+ ]
1008
+ }
1009
+ },
1010
+ "additionalProperties": {
1011
+ "type": "string",
1012
+ "maxLength": 4096
1013
+ }
1014
+ },
1015
+ "baseImages": {
1016
+ "type": "array",
1017
+ "maxItems": 16,
1018
+ "uniqueItems": true,
1019
+ "items": {
1020
+ "$ref": "#/$defs/baseImage"
1021
+ }
1022
+ }
1023
+ }
1024
+ },
1025
+ "buildArgs": {
1026
+ "type": "object",
1027
+ "maxProperties": 64,
1028
+ "propertyNames": {
1029
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,127}$",
1030
+ "not": {
1031
+ "pattern": "^BUILDKIT_"
1032
+ }
1033
+ },
1034
+ "additionalProperties": {
1035
+ "type": "string",
1036
+ "maxLength": 65536
1037
+ }
1038
+ },
1039
+ "buildSecret": {
1040
+ "type": "object",
1041
+ "additionalProperties": false,
1042
+ "required": ["id", "environment"],
1043
+ "properties": {
1044
+ "id": {
1045
+ "$ref": "#/$defs/identifier"
1046
+ },
1047
+ "environment": {
1048
+ "type": "string",
1049
+ "pattern": "^[A-Z_][A-Z0-9_]{0,127}$"
1050
+ }
1051
+ }
1052
+ },
1053
+ "baseImage": {
1054
+ "type": "object",
1055
+ "additionalProperties": false,
1056
+ "required": ["name", "image"],
1057
+ "properties": {
1058
+ "name": {
1059
+ "type": "string",
1060
+ "minLength": 1,
1061
+ "maxLength": 64,
1062
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"
1063
+ },
1064
+ "image": {
1065
+ "$ref": "#/$defs/imageReference"
1066
+ }
1067
+ }
1068
+ },
1069
+ "matrix": {
1070
+ "type": "object",
1071
+ "minProperties": 1,
1072
+ "maxProperties": 8,
1073
+ "propertyNames": {
1074
+ "$ref": "#/$defs/identifier"
1075
+ },
1076
+ "additionalProperties": {
1077
+ "type": "array",
1078
+ "minItems": 1,
1079
+ "maxItems": 32,
1080
+ "uniqueItems": true,
1081
+ "items": {
1082
+ "anyOf": [
1083
+ {
1084
+ "type": "string"
1085
+ },
1086
+ {
1087
+ "type": "number",
1088
+ "minimum": -9007199254740991,
1089
+ "maximum": 9007199254740991
1090
+ },
1091
+ {
1092
+ "type": "boolean"
1093
+ }
1094
+ ]
1095
+ }
1096
+ }
1097
+ },
1098
+ "step": {
1099
+ "type": "object",
1100
+ "additionalProperties": false,
1101
+ "required": ["run"],
1102
+ "properties": {
1103
+ "name": {
1104
+ "type": "string",
1105
+ "minLength": 1,
1106
+ "maxLength": 128
1107
+ },
1108
+ "run": {
1109
+ "$ref": "#/$defs/command"
1110
+ },
1111
+ "environment": {
1112
+ "$ref": "#/$defs/environment"
1113
+ }
1114
+ }
1115
+ },
1116
+ "command": {
1117
+ "type": "array",
1118
+ "minItems": 1,
1119
+ "maxItems": 128,
1120
+ "items": {
1121
+ "type": "string",
1122
+ "minLength": 1,
1123
+ "maxLength": 16384
1124
+ }
1125
+ },
1126
+ "environment": {
1127
+ "type": "object",
1128
+ "maxProperties": 128,
1129
+ "propertyNames": {
1130
+ "pattern": "^[A-Z_][A-Z0-9_]{0,127}$"
1131
+ },
1132
+ "additionalProperties": {
1133
+ "type": "string",
1134
+ "maxLength": 65536
1135
+ }
1136
+ },
1137
+ "secretReference": {
1138
+ "type": "object",
1139
+ "additionalProperties": false,
1140
+ "required": ["name", "environment"],
1141
+ "properties": {
1142
+ "name": {
1143
+ "$ref": "#/$defs/identifier"
1144
+ },
1145
+ "environment": {
1146
+ "type": "string",
1147
+ "pattern": "^[A-Z_][A-Z0-9_]{0,127}$"
1148
+ }
1149
+ }
1150
+ },
1151
+ "resources": {
1152
+ "type": "object",
1153
+ "additionalProperties": false,
1154
+ "properties": {
1155
+ "memoryBytes": {
1156
+ "type": "integer",
1157
+ "minimum": 16777216,
1158
+ "maximum": 1099511627776
1159
+ },
1160
+ "cpus": {
1161
+ "type": "number",
1162
+ "exclusiveMinimum": 0,
1163
+ "maximum": 1024
1164
+ },
1165
+ "pids": {
1166
+ "type": "integer",
1167
+ "minimum": 1,
1168
+ "maximum": 1048576
1169
+ },
1170
+ "sharedMemoryBytes": {
1171
+ "type": "integer",
1172
+ "minimum": 1048576,
1173
+ "maximum": 1099511627776
1174
+ },
1175
+ "workspaceBytes": {
1176
+ "type": "integer",
1177
+ "minimum": 16777216,
1178
+ "maximum": 1099511627776
1179
+ },
1180
+ "workspaceEntries": {
1181
+ "type": "integer",
1182
+ "minimum": 1,
1183
+ "maximum": 2000000
1184
+ }
1185
+ }
1186
+ },
1187
+ "artifact": {
1188
+ "type": "object",
1189
+ "additionalProperties": false,
1190
+ "required": ["name", "path", "when", "required", "maximumBytes", "maximumExtractedBytes", "maximumEntries"],
1191
+ "properties": {
1192
+ "name": {
1193
+ "$ref": "#/$defs/identifier"
1194
+ },
1195
+ "path": {
1196
+ "$ref": "#/$defs/relativePath"
1197
+ },
1198
+ "when": {
1199
+ "enum": ["always", "success", "failure"]
1200
+ },
1201
+ "required": {
1202
+ "type": "boolean"
1203
+ },
1204
+ "maximumBytes": {
1205
+ "type": "integer",
1206
+ "minimum": 1,
1207
+ "maximum": 17179869184
1208
+ },
1209
+ "maximumExtractedBytes": {
1210
+ "type": "integer",
1211
+ "minimum": 1,
1212
+ "maximum": 137438953472
1213
+ },
1214
+ "maximumEntries": {
1215
+ "type": "integer",
1216
+ "minimum": 1,
1217
+ "maximum": 1000000
1218
+ },
1219
+ "retentionDays": {
1220
+ "type": "integer",
1221
+ "minimum": 1,
1222
+ "maximum": 3650
1223
+ }
1224
+ }
1225
+ },
1226
+ "cacheDeclaration": {
1227
+ "type": "object",
1228
+ "required": ["name", "key", "access", "maximumBytes", "maximumExtractedBytes", "maximumEntries"],
1229
+ "properties": {
1230
+ "name": {
1231
+ "$ref": "#/$defs/identifier"
1232
+ },
1233
+ "key": {
1234
+ "type": "string",
1235
+ "minLength": 1,
1236
+ "maxLength": 256
1237
+ },
1238
+ "access": {
1239
+ "enum": ["read", "read-write"]
1240
+ },
1241
+ "maximumBytes": {
1242
+ "type": "integer",
1243
+ "minimum": 1,
1244
+ "maximum": 17179869184
1245
+ },
1246
+ "maximumExtractedBytes": {
1247
+ "type": "integer",
1248
+ "minimum": 1,
1249
+ "maximum": 137438953472
1250
+ },
1251
+ "maximumEntries": {
1252
+ "type": "integer",
1253
+ "minimum": 1,
1254
+ "maximum": 1000000
1255
+ },
1256
+ "retentionDays": {
1257
+ "type": "integer",
1258
+ "minimum": 1,
1259
+ "maximum": 3650
1260
+ }
1261
+ }
1262
+ },
1263
+ "cache": {
1264
+ "$ref": "#/$defs/cacheDeclaration",
1265
+ "type": "object",
1266
+ "unevaluatedProperties": false,
1267
+ "required": ["paths"],
1268
+ "properties": {
1269
+ "paths": {
1270
+ "type": "array",
1271
+ "minItems": 1,
1272
+ "maxItems": 32,
1273
+ "uniqueItems": true,
1274
+ "items": {
1275
+ "$ref": "#/$defs/relativePath"
1276
+ }
1277
+ }
1278
+ }
1279
+ },
1280
+ "buildCache": {
1281
+ "$ref": "#/$defs/cacheDeclaration",
1282
+ "type": "object",
1283
+ "unevaluatedProperties": false
1284
+ },
1285
+ "publicationKind": {
1286
+ "enum": ["images", "npm", "releaseAssets"]
1287
+ },
1288
+ "publish": {
1289
+ "type": "object",
1290
+ "additionalProperties": false,
1291
+ "minProperties": 1,
1292
+ "dependentRequired": {
1293
+ "releaseNotes": ["releaseAssets"]
1294
+ },
1295
+ "allOf": [
1296
+ {
1297
+ "if": {
1298
+ "type": "object",
1299
+ "properties": {
1300
+ "order": {},
1301
+ "images": {}
1302
+ },
1303
+ "required": ["order", "images"]
1304
+ },
1305
+ "then": {
1306
+ "type": "object",
1307
+ "properties": {
1308
+ "order": {
1309
+ "type": "array",
1310
+ "contains": {
1311
+ "const": "images"
1312
+ }
1313
+ }
1314
+ }
1315
+ }
1316
+ },
1317
+ {
1318
+ "if": {
1319
+ "type": "object",
1320
+ "properties": {
1321
+ "order": {},
1322
+ "npm": {}
1323
+ },
1324
+ "required": ["order", "npm"]
1325
+ },
1326
+ "then": {
1327
+ "type": "object",
1328
+ "properties": {
1329
+ "order": {
1330
+ "type": "array",
1331
+ "contains": {
1332
+ "const": "npm"
1333
+ }
1334
+ }
1335
+ }
1336
+ }
1337
+ },
1338
+ {
1339
+ "if": {
1340
+ "type": "object",
1341
+ "properties": {
1342
+ "order": {},
1343
+ "releaseAssets": {}
1344
+ },
1345
+ "required": ["order", "releaseAssets"]
1346
+ },
1347
+ "then": {
1348
+ "type": "object",
1349
+ "properties": {
1350
+ "order": {
1351
+ "type": "array",
1352
+ "contains": {
1353
+ "const": "releaseAssets"
1354
+ }
1355
+ }
1356
+ }
1357
+ }
1358
+ },
1359
+ {
1360
+ "if": {
1361
+ "type": "object",
1362
+ "properties": {
1363
+ "order": {
1364
+ "type": "array",
1365
+ "contains": {
1366
+ "const": "images"
1367
+ }
1368
+ }
1369
+ },
1370
+ "required": ["order"]
1371
+ },
1372
+ "then": {
1373
+ "type": "object",
1374
+ "properties": {
1375
+ "images": {}
1376
+ },
1377
+ "required": ["images"]
1378
+ }
1379
+ },
1380
+ {
1381
+ "if": {
1382
+ "type": "object",
1383
+ "properties": {
1384
+ "order": {
1385
+ "type": "array",
1386
+ "contains": {
1387
+ "const": "npm"
1388
+ }
1389
+ }
1390
+ },
1391
+ "required": ["order"]
1392
+ },
1393
+ "then": {
1394
+ "type": "object",
1395
+ "properties": {
1396
+ "npm": {}
1397
+ },
1398
+ "required": ["npm"]
1399
+ }
1400
+ },
1401
+ {
1402
+ "if": {
1403
+ "type": "object",
1404
+ "properties": {
1405
+ "order": {
1406
+ "type": "array",
1407
+ "contains": {
1408
+ "const": "releaseAssets"
1409
+ }
1410
+ }
1411
+ },
1412
+ "required": ["order"]
1413
+ },
1414
+ "then": {
1415
+ "type": "object",
1416
+ "properties": {
1417
+ "releaseAssets": {}
1418
+ },
1419
+ "required": ["releaseAssets"]
1420
+ }
1421
+ }
1422
+ ],
1423
+ "properties": {
1424
+ "order": {
1425
+ "type": "array",
1426
+ "minItems": 1,
1427
+ "maxItems": 3,
1428
+ "uniqueItems": true,
1429
+ "items": {
1430
+ "$ref": "#/$defs/publicationKind"
1431
+ }
1432
+ },
1433
+ "releaseNotes": {
1434
+ "$ref": "#/$defs/releaseNotesPublication"
1435
+ },
1436
+ "images": {
1437
+ "type": "array",
1438
+ "minItems": 1,
1439
+ "maxItems": 16,
1440
+ "items": {
1441
+ "$ref": "#/$defs/imagePublication"
1442
+ }
1443
+ },
1444
+ "npm": {
1445
+ "type": "array",
1446
+ "minItems": 1,
1447
+ "maxItems": 8,
1448
+ "items": {
1449
+ "$ref": "#/$defs/npmPublication"
1450
+ }
1451
+ },
1452
+ "releaseAssets": {
1453
+ "type": "array",
1454
+ "minItems": 1,
1455
+ "maxItems": 64,
1456
+ "uniqueItems": true,
1457
+ "items": {
1458
+ "$ref": "#/$defs/releaseAssetPublication"
1459
+ }
1460
+ }
1461
+ }
1462
+ },
1463
+ "imagePublication": {
1464
+ "type": "object",
1465
+ "additionalProperties": false,
1466
+ "required": ["candidate", "destinations"],
1467
+ "properties": {
1468
+ "candidate": {
1469
+ "$ref": "#/$defs/identifier"
1470
+ },
1471
+ "destinations": {
1472
+ "type": "array",
1473
+ "minItems": 1,
1474
+ "maxItems": 8,
1475
+ "uniqueItems": true,
1476
+ "items": {
1477
+ "$ref": "#/$defs/imageDestination"
1478
+ }
1479
+ }
1480
+ }
1481
+ },
1482
+ "imageDestination": {
1483
+ "type": "object",
1484
+ "additionalProperties": false,
1485
+ "required": ["registry", "repository", "aliases"],
1486
+ "properties": {
1487
+ "registry": {
1488
+ "$ref": "#/$defs/registryHost"
1489
+ },
1490
+ "repository": {
1491
+ "$ref": "#/$defs/ociRepository"
1492
+ },
1493
+ "aliases": {
1494
+ "type": "array",
1495
+ "minItems": 1,
1496
+ "maxItems": 16,
1497
+ "uniqueItems": true,
1498
+ "items": {
1499
+ "$ref": "#/$defs/imageAlias"
1500
+ }
1501
+ }
1502
+ }
1503
+ },
1504
+ "imageAlias": {
1505
+ "oneOf": [
1506
+ {
1507
+ "type": "object",
1508
+ "additionalProperties": false,
1509
+ "required": ["kind"],
1510
+ "properties": {
1511
+ "kind": {
1512
+ "const": "version"
1513
+ },
1514
+ "prefix": {
1515
+ "type": "string",
1516
+ "minLength": 1,
1517
+ "maxLength": 64,
1518
+ "pattern": "^[A-Za-z0-9_][A-Za-z0-9._-]{0,63}$"
1519
+ },
1520
+ "suffix": {
1521
+ "type": "string",
1522
+ "minLength": 1,
1523
+ "maxLength": 64,
1524
+ "pattern": "^[A-Za-z0-9._-]{1,64}$"
1525
+ }
1526
+ }
1527
+ },
1528
+ {
1529
+ "type": "object",
1530
+ "additionalProperties": false,
1531
+ "required": ["kind", "value"],
1532
+ "properties": {
1533
+ "kind": {
1534
+ "const": "literal"
1535
+ },
1536
+ "value": {
1537
+ "type": "string",
1538
+ "minLength": 1,
1539
+ "maxLength": 128,
1540
+ "pattern": "^[A-Za-z0-9_][A-Za-z0-9._-]{0,127}$"
1541
+ }
1542
+ }
1543
+ }
1544
+ ]
1545
+ },
1546
+ "npmPublication": {
1547
+ "type": "object",
1548
+ "additionalProperties": false,
1549
+ "required": ["artifact", "registries", "access", "distTag"],
1550
+ "properties": {
1551
+ "artifact": {
1552
+ "$ref": "#/$defs/artifactReference"
1553
+ },
1554
+ "registries": {
1555
+ "type": "array",
1556
+ "minItems": 1,
1557
+ "maxItems": 8,
1558
+ "uniqueItems": true,
1559
+ "items": {
1560
+ "$ref": "#/$defs/npmRegistry"
1561
+ }
1562
+ },
1563
+ "access": {
1564
+ "enum": ["public", "restricted"]
1565
+ },
1566
+ "distTag": {
1567
+ "type": "string",
1568
+ "minLength": 1,
1569
+ "maxLength": 64,
1570
+ "pattern": "^[a-z][a-z0-9._-]{0,63}$"
1571
+ }
1572
+ }
1573
+ },
1574
+ "npmRegistry": {
1575
+ "type": "string",
1576
+ "minLength": 9,
1577
+ "maxLength": 1024,
1578
+ "pattern": "^https://[a-z0-9.-]+(?::[0-9]{1,5})?(?:/[^\\s?#]*)?$"
1579
+ },
1580
+ "npmScope": {
1581
+ "type": "string",
1582
+ "minLength": 2,
1583
+ "maxLength": 129,
1584
+ "pattern": "^@[a-z0-9~-][a-z0-9_.~-]{0,127}$"
1585
+ },
1586
+ "npmRead": {
1587
+ "description": "Attempt-scoped read access to npm packages of the listed scopes on the listed registries.",
1588
+ "type": "array",
1589
+ "minItems": 1,
1590
+ "maxItems": 8,
1591
+ "uniqueItems": true,
1592
+ "items": {
1593
+ "type": "object",
1594
+ "additionalProperties": false,
1595
+ "required": ["registry", "scopes"],
1596
+ "properties": {
1597
+ "registry": {
1598
+ "$ref": "#/$defs/npmRegistry"
1599
+ },
1600
+ "scopes": {
1601
+ "type": "array",
1602
+ "minItems": 1,
1603
+ "maxItems": 16,
1604
+ "uniqueItems": true,
1605
+ "items": {
1606
+ "$ref": "#/$defs/npmScope"
1607
+ }
1608
+ }
1609
+ }
1610
+ }
1611
+ },
1612
+ "releaseNotesPublication": {
1613
+ "type": "object",
1614
+ "additionalProperties": false,
1615
+ "required": ["artifact"],
1616
+ "properties": {
1617
+ "artifact": {
1618
+ "$ref": "#/$defs/artifactReference"
1619
+ }
1620
+ }
1621
+ },
1622
+ "releaseAssetPublication": {
1623
+ "type": "object",
1624
+ "additionalProperties": false,
1625
+ "required": ["artifact"],
1626
+ "properties": {
1627
+ "artifact": {
1628
+ "$ref": "#/$defs/artifactReference"
1629
+ }
1630
+ }
1631
+ },
1632
+ "artifactReference": {
1633
+ "type": "object",
1634
+ "additionalProperties": false,
1635
+ "required": ["job", "name"],
1636
+ "properties": {
1637
+ "job": {
1638
+ "$ref": "#/$defs/identifier"
1639
+ },
1640
+ "name": {
1641
+ "$ref": "#/$defs/identifier"
1642
+ }
1643
+ }
1644
+ },
1645
+ "registryHost": {
1646
+ "type": "string",
1647
+ "minLength": 1,
1648
+ "maxLength": 253,
1649
+ "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*(?::[0-9]{1,5})?$"
1650
+ },
1651
+ "ociRepository": {
1652
+ "type": "string",
1653
+ "minLength": 1,
1654
+ "maxLength": 255,
1655
+ "pattern": "^[a-z0-9]+(?:(?:\\.|_|__|-+)[a-z0-9]+)*(?:/[a-z0-9]+(?:(?:\\.|_|__|-+)[a-z0-9]+)*)*$"
1656
+ },
1657
+ "relativePath": {
1658
+ "type": "string",
1659
+ "minLength": 1,
1660
+ "maxLength": 1024,
1661
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\u0000).+$"
1662
+ }
1663
+ }
1664
+ }