Add Synology CPUSet CI bootstrap for actual NAS capabilities

This commit is contained in:
Codex
2026-09-29 15:12:35 +03:00
parent 3321046c2a
commit 1650c4f221
9 changed files with 285 additions and 31 deletions
+5 -2
View File
@@ -16,11 +16,14 @@ SOURCE = Path(__file__).resolve().parent
ENTRIES = ("docker-compose.gitea-ci.yml", "runner.yaml", "deployment/bootstrap-v1.json")
V2_ENTRIES = ("docker-compose.gitea-ci.yml", "runner.yaml", "deployment/bootstrap-v2.json")
V3_ENTRIES = ("docker-compose.gitea-ci.yml", "runner.yaml", "deployment/bootstrap-v3.json")
V4_ENTRIES = ("docker-compose.gitea-ci.yml", "runner.yaml", "deployment/bootstrap-v4.json")
def entries_for(patch_id):
if not re.fullmatch(r"gitea-ci-bootstrap-v[123]-[a-zA-Z0-9._-]{1,65}", patch_id):
if not re.fullmatch(r"gitea-ci-bootstrap-v[1234]-[a-zA-Z0-9._-]{1,65}", patch_id):
raise ValueError("invalid_bootstrap_identity")
if patch_id.startswith("gitea-ci-bootstrap-v4-"):
return V4_ENTRIES
if patch_id.startswith("gitea-ci-bootstrap-v3-"):
return V3_ENTRIES
return V2_ENTRIES if patch_id.startswith("gitea-ci-bootstrap-v2-") else ENTRIES
@@ -28,7 +31,7 @@ def entries_for(patch_id):
def bundle(patch_id, source=SOURCE):
entries = entries_for(patch_id)
config_source = source / "synology-v3" if entries == V3_ENTRIES else source
config_source = source / "synology-v4" if entries == V4_ENTRIES else source / "synology-v3" if entries == V3_ENTRIES else source
descriptor = json.loads((source / Path(entries[2]).name).read_text())
if descriptor["releaseId"] != "__PATCH_ID__":
raise ValueError("bootstrap_template_identity_mismatch")