chore(ci): только stage, Барбариска выведена (refs #4)
deploy-preland / deploy zoomstage.online (push) Successful in 35s

This commit is contained in:
Panfilov Konstantin committed 2026-10-19 14:57:39 +03:00
1 parent 0f06a18622
commit d2637e8f61
5 files changed
+39 -264

No files matched your search

+1 -1
View File
@@ -64,7 +64,7 @@ if (!str_contains($workflow, '|[0-9]+/)')) {
$failures[] = 'Stage-деплой не должен перезаписывать корневые наборы /N/: stage владеет их содержимым.';
}
if (substr_count($workflow, 'while [ -n "$dir" ]; do') < 2) {
if (substr_count($workflow, 'while [ -n "$dir" ]; do') < 1) {
$failures[] = 'SFTP-деплой должен создавать все родительские каталоги для новых наборов assets.';
}
+14 -24
View File
@@ -36,30 +36,20 @@ if (!is_array($config)) {
}
$workflow = (string) file_get_contents($root . '/.gitea/workflows/deploy.yml');
$legacyStart = strpos($workflow, ' deploy:');
$stageStart = strpos($workflow, 'deploy-zoomstage:');
$productionStart = strpos($workflow, 'deploy-zoompixel-production:');
$legacyBlock = $legacyStart === false || $stageStart === false
? ''
: substr($workflow, $legacyStart, $stageStart - $legacyStart);
$stageBlock = $stageStart === false || $productionStart === false
? ''
: substr($workflow, $stageStart, $productionStart - $stageStart);
$productionBlock = $productionStart === false ? '' : substr($workflow, $productionStart);
foreach ([
'legacy FTP' => $legacyBlock,
'deploy-zoomstage' => $stageBlock,
'deploy-zoompixel-production' => $productionBlock,
] as $delivery => $block) {
if ($block === ''
|| !str_contains($block, 'config\\.json$')
|| !str_contains($block, 'ensure-focus-config.php')
|| !str_contains($block, 'Preserve host config and add focus if absent')) {
$failures[] = "{$delivery} обязан сохранять хостовый config.json и менять только явно согласованный focus.";
}
$stageStart = strpos($workflow, ' deploy-zoomstage:');
$stageBlock = $stageStart === false ? '' : substr($workflow, $stageStart);
if ($stageBlock === '' || !str_contains($stageBlock, 'config\\.json$')
|| !str_contains($stageBlock, 'ensure-focus-config.php')
|| !str_contains($stageBlock, 'Preserve host config and add focus if absent')) {
$failures[] = 'Stage обязан сохранять хостовый config.json и согласованный focus-контракт.';
}
if (preg_match_all('/^ [a-z][a-z0-9-]*:/m', substr($workflow, strpos($workflow, 'jobs:')), $jobs) !== 1
|| !str_contains($workflow, " - staging")
|| str_contains($workflow, " - main")
|| str_contains($workflow, 'deploy-zoompixel-production:')
|| str_contains($workflow, 'barbariskatest')) {
$failures[] = 'По решению владельца автодеплой должен содержать только staging/zoomstage.online.';
}
if (is_file($root . '/config.json.example')) {
$failures[] = 'config.json.example не должен существовать: рабочий config.json единственный.';
}
@@ -69,4 +59,4 @@ if ($failures !== []) {
exit(1);
}
fwrite(STDOUT, "OK: versioned stage config and ZoomPixel delivery\n");
fwrite(STDOUT, "OK: host config preserved; deploy targets stage only\n");