Skip to content

Commit a804ced

Browse files
committed
restrict number of buildcaches and bootstraps in mirror schema
1 parent 613ad88 commit a804ced

1 file changed

Lines changed: 47 additions & 39 deletions

File tree

stackinator/schema/mirror.json

Lines changed: 47 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,54 @@
11
{
22
"type" : "object",
3-
"additionalProperties": {
4-
"type": "object",
5-
"required": ["url"],
6-
"additionalProperties": false,
7-
"properties": {
8-
"url": {
9-
"type": "string",
10-
"description": "URL to the mirror. Can be a simple path, or any protocol Spack supports (https, OCI)."
3+
"additionalProperties": false,
4+
"properties": {
5+
"bootstrap": {
6+
"type": "object",
7+
"properties": {
8+
"description": {"type": "string"},
9+
"url": {"type": "string"},
10+
"enabled": {
11+
"type": "boolean",
12+
"default": true
13+
}
1114
},
12-
"description": {
13-
"type": "string",
14-
"description": "What this mirror is for."
15+
"additionalProperties": false,
16+
"required": ["url"]
17+
},
18+
"buildcache": {
19+
"type": "object",
20+
"properties": {
21+
"description": {"type": "string"},
22+
"url": {"type": "string"},
23+
"enabled": {
24+
"type": "boolean",
25+
"default": true
26+
},
27+
"public_key": {"type": "string"},
28+
"private_key": {"type": "string"},
29+
"mount_specific": {
30+
"type": "boolean",
31+
"default": false
32+
}
1533
},
16-
"enabled": {
17-
"type": "boolean",
18-
"default": true,
19-
"description": "Whether this mirror is enabled."
20-
},
21-
"bootstrap": {
22-
"type": "boolean",
23-
"default": false,
24-
"description": "Whether to use as a mirror for bootstrapping. Will also use as a regular mirror."
25-
},
26-
"cache": {
27-
"type": "boolean",
28-
"default": false,
29-
"description": "Use this mirror as the buildcache push destination. Can only be enabled on a single mirror."
30-
},
31-
"public_key": {
32-
"type": "string",
33-
"description": "Public PGP key for validating binary cache packages. A path or base64 encoded key."
34-
},
35-
"private_key": {
36-
"type": "string",
37-
"description": "Private PGP key for signing binary cache packages. (Path only)"
38-
},
39-
"mount_specific": {
40-
"type": "boolean",
41-
"default": false,
42-
"description": "Use a mount specific buildcache path (specified path + recipe mount point)."
34+
"additionalProperties": false,
35+
"required": ["url"]
36+
},
37+
"sourcecache": {
38+
"type": "object",
39+
"additionalProperties": {
40+
"type": "object",
41+
"properties": {
42+
"description": {"type": "string"},
43+
"url": {"type": "string"},
44+
"enabled": {
45+
"type": "boolean",
46+
"default": true
47+
}
48+
},
49+
"additionalProperties": false,
50+
"required": ["url"]
4351
}
4452
}
4553
}
46-
}
54+
}

0 commit comments

Comments
 (0)