blob: 1344edcefb8d9bbc2fdef7232e31cfaf282f0614 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
$schema: http://json-schema.org/draft-04/schema#
id: http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/schemas/chunk.json-schema
description: |
This is a JSON-Schema description of a 'stratum' .morph file, which is part
of the Baserock definitions YAML representation format.
This JSON-Schema file is valid for VERSION 7 of the Baserock definitions
YAML serialisation format.
The Baserock definitions format is the recommended way of representing
Baserock definitions on disk. The actual data model is described separately.
See https://wiki.baserock.org/definitions for more information.
This schema is represented as YAML, so that it can be edited more easily.
You may need to convert to JSON if using a JSON-Schema tool that expects
its input to be an actual string containing data serialised as JSON.
definitions:
# Defines one or more instances of StratumArtifact from the Baserock data
# model.
split-rules:
type: array
items:
type: object
required: [artifact, include]
additionalProperties: false
properties:
artifact: {type: string}
include:
type: array
items:
type: string
format: regex
# Corresponds to ChunkReference in Baserock data model.
chunk-reference:
type: object
required: [ 'repo', 'ref' ]
additionalProperties: false
properties:
name: { type: string }
morph: { type: string }
repo: { type: string }
ref: { type: string }
unpetrify-ref: { type: string }
build-mode: { type: string }
prefix: { type: string }
build-system: { type: string }
build-depends:
type: array
items: { type: string }
artifacts:
type: object
# This defines which chunk artifacts go in which stratum artifact.
# E.g. "glibc-nss: build-essential-runtime" specifies the glibc-nss
# chunk artifact should go in the build-essential-runtime stratum
# artifact.
patternProperties:
^.*$: { type: string }
submodules:
$ref: "#/definitions/submodule-reference"
submodule-reference:
type: object
properties:
url: { type: string }
submodules:
$ref: "#/definitions/submodule-reference"
# This doesn't need any special treatment in the Baserock data model because
# it's a link to another stratum definition, without any extra info.
stratum-reference:
type: object
required: [ 'morph' ]
additionalProperties: false
properties:
morph: { type: string }
# Corresponds to Stratum in Baserock data model.
type: object
required: [ 'name', 'kind', 'chunks' ]
additionalProperties: false
properties:
name: { type: string }
kind: { enum: [ "stratum" ] }
description: { type: string }
build-depends:
type: array
items:
$ref: "#/definitions/stratum-reference"
products:
$ref: "#/definitions/split-rules"
chunks:
type: array
items: { $ref: "#/definitions/chunk-reference" }
|