ci: arm64-attach supports cac-lsphp, cac-litespeed and shared-ols
Extends the dispatch-only attach workflow to the LiteSpeed family: same additive mechanism (amd64 manifest digest untouched), arm64 built from the packaged lsphp, with a parity gate (PHP version, SAPI, extensions, every ini value, OLS version) against the existing amd64 image before the tag is touched. Tests and docs/arm64-ols-family.md updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
50a031a486
commit
044168f504
4 files changed
+189
-23
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
// arm64-parity-probe.php - facts that must be IDENTICAL between the existing amd64 image and the
|
||||
// arm64 image attached to the same tag (version, SAPI, loaded extensions + versions, every ini
|
||||
// value). Run twice by arm64-attach.yaml: `lsphp probe.php` (image config) and
|
||||
// `lsphp -n probe.php` (compiled-in defaults only, e.g. session.upload_progress.enabled).
|
||||
// Output is plain text so a failed parity check prints a readable diff. No timestamps/paths of
|
||||
// the build host: only things a customer's PHP can observe.
|
||||
echo 'PHP_VERSION=', PHP_VERSION, "\n";
|
||||
echo 'PHP_VERSION_ID=', PHP_VERSION_ID, "\n";
|
||||
echo 'SAPI=', php_sapi_name(), "\n";
|
||||
echo 'ZTS=', (PHP_ZTS ? 1 : 0), ' DEBUG=', (PHP_DEBUG ? 1 : 0), ' INT_SIZE=', PHP_INT_SIZE, "\n";
|
||||
echo 'EXTENSION_DIR=', ini_get('extension_dir'), "\n";
|
||||
$ext = get_loaded_extensions();
|
||||
sort($ext, SORT_STRING);
|
||||
foreach ($ext as $e) {
|
||||
echo 'ext ', $e, ' ', (phpversion($e) ?: '-'), "\n";
|
||||
}
|
||||
$ini = ini_get_all(null, false);
|
||||
ksort($ini, SORT_STRING);
|
||||
foreach ($ini as $k => $v) {
|
||||
echo 'ini ', $k, '=', var_export($v, true), "\n";
|
||||
}
|
||||
@@ -397,14 +397,15 @@ class AttachWorkflow(unittest.TestCase):
|
||||
self.assertNotIn('${{', blk) # everything reaches the script through env:
|
||||
self.assertNotIn('github.event.inputs', self.job.split('Validate inputs', 1)[1].split('Login to Gitea', 1)[1])
|
||||
|
||||
def test_only_images_cac_and_cac_fpm_and_php82_to_86(self):
|
||||
def test_only_the_five_known_images_and_php_ranges(self):
|
||||
v = step(self.job, 'Validate inputs')
|
||||
self.assertRegex(v, r'cac\)\s+dockerfile=Dockerfile;')
|
||||
self.assertRegex(v, r'cac-fpm\)\s+dockerfile=Dockerfile\.fpm;')
|
||||
self.assertIn('^8[2-6]$', v)
|
||||
self.assertEqual(re.findall(r'(?m)^ ([a-z-]+)\)', v), ['cac', 'cac-fpm'])
|
||||
self.assertNotIn('litespeed', v)
|
||||
self.assertNotIn('lsphp', v)
|
||||
self.assertRegex(v, r'cac-lsphp\|cac-litespeed\)')
|
||||
self.assertRegex(v, r'shared-ols\)')
|
||||
self.assertIn("^8[2-5]$", v) # OLS family: 82-85 only
|
||||
self.assertEqual(re.findall(r'(?m)^ ([a-z-]+)\)', v), ['cac', 'cac-fpm', 'shared-ols'])
|
||||
|
||||
def test_arm64_only_push_by_digest_no_tags(self):
|
||||
self.assertEqual(len(re.findall(r'platforms: linux/', self.job)), 1)
|
||||
@@ -420,7 +421,7 @@ class AttachWorkflow(unittest.TestCase):
|
||||
def test_nothing_but_the_script_writes_a_tag(self):
|
||||
for bad in ('imagetools create', 'docker push', 'docker tag', '/cac:latest', '/cac-fpm:latest', 'ghcr.io'):
|
||||
self.assertNotIn(bad, self.job, bad)
|
||||
self.assertEqual(self.job.count('docker buildx build'), 1) # only the local PHP-version probe
|
||||
self.assertEqual(self.job.count('docker buildx build'), 3) # only the local probes: php version (rpm), OLS version (shared-ols), lsphp probe
|
||||
self.assertIn('type=local,dest=', self.job)
|
||||
self.assertNotIn('--push', self.job)
|
||||
self.assertEqual(self.job.count('scripts/attach-arm64-index.sh'), 2) # plan (read-only) + attach
|
||||
|
||||
Reference in new issue
Block a user