Add CMS deployment builders, policy sources and regression suite

This commit is contained in:
Codex
2026-11-04 21:51:05 +03:00
parent 28d8466ef9
commit aeaaae50c3
22 changed files with 2316 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
"""Refresh the reviewed standalone section; runtime never imports from SMB."""
import json
from pathlib import Path
ROOT=Path(__file__).resolve().parent
RUNNER=ROOT.parent/'deploy-runner/nodedc-deploy'
START='# BEGIN GENERATED CMS DEPLOYMENT\n'
END='# END GENERATED CMS DEPLOYMENT\n'
def section():
release=(ROOT/'release_runtime.py').read_text().replace('__CMS_BASELINE__',repr(json.loads((ROOT/'baseline.json').read_text()))).replace('__CMS_FOUNDATION__',repr(json.loads((ROOT/'foundation.json').read_text())))
ci=(ROOT/'ci_runtime.py').read_text().replace('__CMS_CI_HASHES__',repr(json.loads((ROOT/'ci-source-sha256.json').read_text())))
auto=(ROOT/'autodeploy_runtime.py').read_text()
library='def cms_autodeploy_library():\n'
for file in ('deployment_queue.py','gitea_source.py','controller.py'):
lines=[line for line in (ROOT/file).read_text().splitlines() if not line.startswith('from deployment_queue import ')]
library+='\n'.join(' '+line if line else '' for line in lines)+'\n\n'
library+=' return DeploymentQueue, GiteaSource, Controller, (QueueError, SourceError)\n'
return START+release+'\n'+ci+'\n'+auto+'\n'+library+END
if __name__=='__main__':
before,rest=RUNNER.read_text().split(START,1);_,after=rest.split(END,1)
RUNNER.write_text(before+section()+after)